-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add #![no_std] support #271
Conversation
Fixes #138.
@@ -160,10 +160,44 @@ | |||
// False positives when block expressions are used inside an assertion. | |||
#![allow(panic_params)] | |||
|
|||
#![no_std] | |||
#![cfg_attr(feature = "nightly", feature(alloc))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this to use a nightly
feature, instead of not(feature = "std")
like we do elsewhere? It'd be nice if cargo build --no-default-features
could work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. See Cargo.toml:
nightly = ["fallible-iterator/alloc"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is probably nitpicky, but I just want to make sure I understand if you don't mind:
- do we need to use
fallible-iterator/alloc
in gimli? - why don't the uses of the alloc crate depend on the
nightly
feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to use fallible-iterator/alloc in gimli?
Yes. Otherwise, it cannot be tested without the std
feature, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for adding |
@fitzgen Just |
Ah, yeah that makes sense. Thanks again! |
Fixes #138.
This was surprisingly easy. There are essentially no meaningful changes required.