Skip to content
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 support #563

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

no_std support #563

wants to merge 1 commit into from

Conversation

olanod
Copy link

@olanod olanod commented Jul 28, 2022

This PR turns the crate into no_std compatible replacing std references with core + alloc and adding the std feature where needed(std::error::Error support).
Also tried to make the dependency on HashMap optional making extensions an optional feature, the ahash dependency shouldn't be an issue since it's already a dependency of hashbrown which is the the std HashMap implementation.

Extensions are also made an optional feature to not require depending on HashMap
@jplatte
Copy link
Contributor

jplatte commented Sep 8, 2022

TypeId implements Ord, so how about using BTreeMap for extensions if there is no std, rather than not having it?

@algesten
Copy link

This looks really good. Wonder if the crate authors will get time to consider it?

@algesten
Copy link

algesten commented Oct 1, 2023

Hm. I guess it doesn't get rid of allocations cause it relies on the extern crate alloc

@seanmonstar seanmonstar added this to the 1.0 milestone Nov 10, 2023
@seanmonstar seanmonstar added the B-breaking Blocked: breaking change. This requires a breaking change. label Nov 10, 2023
@seanmonstar
Copy link
Member

I'm not sure about getting this into 1.0, but I do want to allow for it. I think the only breaking change would be to add a std feature that is default-on, yea? Then we could eventually fix up support with it off.

@algesten
Copy link

Yes. I got a feeling i've seen more std feature flags than the opposite no_std. Either way works though.

@seanmonstar
Copy link
Member

I created #637 which does that, allowing us to eventually add support later.

@seanmonstar seanmonstar removed this from the 1.0 milestone Nov 10, 2023
@seanmonstar seanmonstar removed the B-breaking Blocked: breaking change. This requires a breaking change. label Nov 10, 2023
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.

None yet

4 participants