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
#64
Conversation
I think, as you mention in the post, that this might be the wrong way to go about it. Cargo features are strictly additive, and so there should be an What do you think about this? |
I did use a |
This might require |
Hey, this has a few conflicts. Could you resolve them? Happy to merge after that. |
Thanks very much! I'll probably try to find time to add a |
Glad you could work it out @wackbyte. I didn't get the hasher to compile properly. Your I should have updated the issue with my progress and problem though, maybe it could have been solved that way! |
Great to hear that the library fits this use-case. I'm interested to hear how it works out! |
I added a
std
feature to support building withno_std
.If enabled, it implements the
Error
trait and usesstd
'sHashSet
.Otherwise, it doesn't implement
Error
and useshashbrown
'sHashSet
.However, there are a few details I'd like to hear your opinion on if I need to make some changes.
no_std
is disabled in documentation.hashbrown
can't be optional. It could probably be if there was ano_std
feature instead, but according to the feature reference in the Cargo book, features should be additive, and astd
feature should be used over ano_std
one.hashbrown
and found that it usesahash
by default (through a default feature), so I removed the direct dependency on it and used it throughhashbrown
. This may be undesirable.Verbose
struct in thedebug
module currently uses theprint!
macros. Since those do not exist in ano_std
environment, the function that uses them was changed to be a no-op whenstd
is disabled.(Closes #38)