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 with alloc #183

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

Conversation

jmlepisto
Copy link

@jmlepisto jmlepisto commented Aug 19, 2024

Basic no_std support for environments where alloc is provided.

  • Restructured features to allow customized configurations with default-resolver with or without std
  • No functional changes, only restructured dependencies and related feature flags
  • Tested in the wild by building for a bare metal RISC-V target

Basically all crypto primitives are now individually selectable with use-xxx-yyy features. Users can build their own combinations of DH + Crypto + Hash with default-resolver to create minimal builds without the standard library for embedded targets. lib.rs includes a safeguard to make sure that all required components are provided at build time.

This changes the feature flag interface of this crate a bit, but existing features are left in place for the sake of backwards compatibility.

Providing no_std support for other resolvers beside the default one is not in the scope of this PR.

#62
#179

Added basic no_std support by switching to `core` and `alloc`
libraries wherever possible. Restructured features in Cargo.toml
to allow for customized setups with or without the standard library.
@jmlepisto
Copy link
Author

FYI @mcginty
We will be running these changes on our internal embedded products and will get good test coverage in the process.
So far everything looks good and there are no issues whatsoever on any of the tested platforms.

@jmlepisto
Copy link
Author

Ping @mcginty, any thoughts or comments on this? Would love to get these changes upstreamed eventually :)

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.

1 participant