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

#80 Add features to let WASM use a 32bit backend for ed25519. Also re-enables CC on clear_on_drop #81

Merged
merged 3 commits into from
Jul 16, 2019

Conversation

ernieturner
Copy link
Contributor

@ernieturner ernieturner commented Jul 16, 2019

Rust's dependency feature management isn't in a great place. The goal here was to allow WASM builds to use the ed25519 u32 backend and then use the u64 backend for every other build type. In order to do that we have to disable the u64 for everything and then manually re-enable it using the feature flags. Otherwise ed25519 gets built with both flags which causes a bunch of compile errors for duplicate constants. Relevant issue: dalek-cryptography/curve25519-dalek#264

This ideally would be solved by using the architecture-detection flags (i.e. target.'cfg(target_env = "wasm32")'.dependencies) but that doesn't seem to work as expected either.

Copy link
Contributor

@clintfred clintfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Doesn't seem to be any detectable performance impact for 64-bit Linux, so that's a good sign.

@ernieturner ernieturner merged commit f2a6905 into master Jul 16, 2019
@ernieturner ernieturner deleted the wasmFeatures branch July 16, 2019 19:52
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.

3 participants