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

Add partial no-std support #7

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

Conversation

stevefan1999-personal
Copy link
Contributor

@stevefan1999-personal stevefan1999-personal commented Jan 27, 2024

This PR just introduced Clippy rules that translate some std use to core/alloc as much as possible, despite there are some features required manual std feature marking. However, the biggest obstacle would still be petgraph since it is not yet no-std ready. So I keep this as more of a preparation. Once petgraph is going for 0.7.0 we can immediately change to no_std.

Missing features:

  1. Actual no_std codegen for the compiler. This shouldn't be hard because the surface area on the generated code isn't that large.
  2. Decide whether we should use BTreeSet or we use hashbrown directly.
  3. Another point is that we don't need a HashDoS resistant hash table at all because the place we used a hash table for is only needed to detect ambiguities.
  4. Maybe optimize to use smallvec, too?

@igordejanovic
Copy link
Owner

I don't have experience with no_std so I'll leave directing this change to you.
BTreeSet/Map IIRC is used in places where deterministic ordering was needed but this could be revisited. Also for HashDoS resistant maps.

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