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
more no_std support #471
more no_std support #471
Conversation
Massive patches create additional labor for reviewers. It's good etiquette to minimize patch size. Could you please submit which changes only the necessary lines? |
Do you mean to redo thoose cargo fmt changes, or just mark lines that I have changed ? |
A PR without any PRs that change many lines are also very likely to invalidate other pull requests, creating additional work for those authors. The bigger the PR, the lower priority of review it tends to get. |
FYI, you could probably |
df325b8
to
4573305
Compare
I have fix the cargo fmt problem, only relevant changes are now left. It passed no std check |
@@ -24,6 +24,7 @@ test = false | |||
|
|||
[dependencies] | |||
either = { version = "1.0", default-features = false } | |||
hashbrown = { version = "0.8", optional = true} |
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.
Hashbrown doesn't seem to have a minimum-supported-Rust-version policy—Itertools does. We therefore can't just drop-in hashbrown as an alternative to std::collections::HashMap
.
I've opened #474, which implements a minimal I'm happy to revisit porting |
474: Minimal `use_alloc` feature r=jswrenn a=jswrenn Introduces a `use_alloc` feature. **Breaking Change:** [**Increases the MSRV to 1.36.0**](https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#the-alloc-crate-is-stable) `Vec`, `String`, etc., use their alternatives defined in `alloc`. No attempt is made to support `HashMap`, which is *not* defined in `alloc`. This is thus a more minimal introduction of `use_alloc` than #471. Fixes #365. Partially fixes #470. Co-authored-by: Jack Wrenn <me@jswrenn.com>
I have implemented most functions to be able to use in
no_std
withalloc
(by using optional featureuse_alloc
). Also I have included optional cratehashbrown
(it is used while usinguse_alloc
) for no_stdHashmap
.Everything builds and tests are passing in both default and no default with feature
use_alloc
.There are many changes due to cargo fmt, if this is a problem I can return them to previous formatting, however this will require some manual work.