Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Support for no_std #111

Merged
merged 3 commits into from Sep 3, 2019
Merged

Conversation

CryZe
Copy link
Contributor

@CryZe CryZe commented Aug 12, 2019

This adds the features std and alloc to the crate. The std feature is activated by default. This would bump the minimum supported version to 1.34.0, but only due to the byteorder removal (which apparently is also happening in #110).

Supersedes #62

@marshallpierce
Copy link
Owner

This is great, thank you.

A few thoughts:

  • Can you add a bit of docs to the README explaining when to use the features?
  • I'm new to the no_std world so maybe there's something obvious I'm missing, but alloc was stabilized in 1.36.0 -- wouldn't that need to be the minimum version here?
  • What can we do CI-wise to ensure that we don't break things for a no-std user?

@CryZe
Copy link
Contributor Author

CryZe commented Aug 27, 2019

alloc is only used when the std feature is deactivated and the alloc feature is. So 1.34.0 can still be the minimum version (but lower is also possible, we only use it for the byte reading stuff).

For CI we can compile to thumbv6m-none-eabi, which doesn't have std. I'll look into making it compile to that. However we can't run the tests then.

I'll put a section into the README.

This adds the features `std` and `alloc` to the crate. The `std` feature
is activated by default.
@CryZe
Copy link
Contributor Author

CryZe commented Sep 3, 2019

This should be good to go now.

@codecov-io
Copy link

codecov-io commented Sep 3, 2019

Codecov Report

Merging #111 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #111      +/-   ##
=========================================
+ Coverage   95.88%   95.9%   +0.02%     
=========================================
  Files          12      12              
  Lines        1457    1490      +33     
=========================================
+ Hits         1397    1429      +32     
- Misses         60      61       +1
Impacted Files Coverage Δ
src/lib.rs 92.3% <ø> (ø) ⬆️
src/chunked_encoder.rs 98.78% <ø> (ø) ⬆️
src/display.rs 100% <ø> (ø) ⬆️
src/encode.rs 98.05% <100%> (+0.02%) ⬆️
src/decode.rs 94.42% <100%> (+0.02%) ⬆️
tests/decode.rs 99.27% <0%> (-0.73%) ⬇️
src/write/encoder_tests.rs 94.66% <0%> (+0.03%) ⬆️
tests/tests.rs 98.85% <0%> (+0.04%) ⬆️
tests/encode.rs 97.56% <0%> (+0.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4cd64f...b4da176. Read the comment docs.

@marshallpierce
Copy link
Owner

Great, thank you!

@marshallpierce marshallpierce merged commit a40d420 into marshallpierce:master Sep 3, 2019
@marshallpierce marshallpierce mentioned this pull request Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants