Skip to content

Fix the no_std build #48

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

Fix the no_std build #48

wants to merge 2 commits into from

Conversation

rillian
Copy link
Contributor

@rillian rillian commented Jun 20, 2024

Don't know if this is helpful or not. I noticed some breakage with different feature flags, which lead to this cleanup, but didn't know how to test with any wasm targets so I don't know if that target was actually broken or is different now.

  • Remove the alloc feature; the crate is now always available in stable rust, so we don't need a feature flag to request it.
  • Enable curve25519-dalek/alloc unconditionally since dleq uses the multiscalar_mul unconditionally.
  • Add a ci job to verify --no-default-features works.

Anyway, these changes made the behaviour less surprising for me, so please consider.

The `alloc` crate is always available in rust 1.36 and later,
so we don't need a special feature flag to enable it. Instead,
enable the `curve25519-dalek/alloc` feature unconditionally
and rely on building with `--no-default-features` to disable
standard library dependence.

Restores building and running tests in a no_std environment.
@rillian rillian self-assigned this Jun 20, 2024
Add a continuous integration job to confirm the no_std build
is working.
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