Skip to content

No std support #150

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

No std support #150

wants to merge 2 commits into from

Conversation

CBJamo
Copy link

@CBJamo CBJamo commented Jun 16, 2024

Switch std imports to core or alloc where possible. Add std feature which defaults on. Modules map and orswot are gated behind std. Everything else works with no other changes.

map and orswot could be supported in no_std if the std hashmap was replaced with hashbrown's hashmap, but I figured I'd make the more conservative change first.

This PR currently requires nightly for error in core which will stabilize in 1.81, this is why the PR is marked draft. The error related parts of this PR could be gated behind a nightly feature and then be merged now, but I don't think there's a rush and the PR can just wait till 1.81 is released.

Add std feature which defaults on
modules map and orswot gated behind std
crate is no_std when not std
@davidrusu
Copy link
Member

Looks good!

Do you need Map/Orswot in your work? I'm a bit wary to bring on another dependency.

Perhaps we can make it an optional dependency if a no_std feature is enabled?

@CBJamo
Copy link
Author

CBJamo commented Jun 18, 2024

Nope, for my use I'll be using lwwreg and vclock.

Perhaps a hashbrown feature to opt into it, rather than somewhat obscuring it behind no_std? I don't know if there is any reason besides no_std environments where's useful, but nothing else would need to be behind a no_std feature.

@CBJamo CBJamo marked this pull request as ready for review September 8, 2024 22:36
@CBJamo
Copy link
Author

CBJamo commented Sep 8, 2024

No changes needed post-stabilization.

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.

2 participants