-
Notifications
You must be signed in to change notification settings - Fork 49
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
No_std with alloc. Compiles, tests pass #92
Conversation
Please note that any possible checks are still done for normal std. If you like I can create new workflow for no_std only - if its not a nuisance for you. |
Thanks for the PR! Adding no-std support is always a chore. But it should be feasible for spade and sounds like a good addition! |
I am doing this for few crates and honestly I just learned about this: https://crates.io/crates/no-std-compat -.- It simplifies a lot. If you want I can raise another PR just to compare and pick a better one. |
That's an interesting crate - thanks for sharing! It's the first time I'm hearing from that. I think there's value in unifying how no-std crates are being built though I'm being hesitant to be an "early adopter" - the crate doesn't seem to be super wide spread as of now. |
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.
Review done!
I've found a lot of liking to the idea to be no-std by default. This will require a few changes (nothing major though?) and should be an overall simplification.
Once that's done this PR should be ready to go.
2ec551c
to
c17b9bb
Compare
…or one Error trait, but can be turned off using features.
Yep, I plan to add that and some additional documentation. |
Feature is available with v2.3.0 on crates.io |
Changes many std usages to core, vectors from
alloc
through feature withhashbrown
crate for HashMap/Set.Honestly I don't know how much of it actually compiles with pure no_std, probably very little, but I just wished for no_std with alloc, hence this PR.
I have not used this in a real app/lib yet, but I hope the changes are trivial on its own. Sadly it introduces a bit of a mess in code.
I am open to any opinions, refactors, etc. Its definitely not perfectly done. Its okay if you don't want to merge this, I'll keep the fork, but it would be really cool if it did.