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

make getrandom behind the wasm feature flag #17

Merged
merged 22 commits into from
Feb 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
make getrandom behind the wasm feature flag
shekohex committed Feb 6, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 5c338cf7363e4e2fc57ff5af51796a93c21ee7d9
4 changes: 2 additions & 2 deletions generic-ec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ hex = { version = "0.4", default-features = false, optional = true }
phantom-type = { version = "0.4", default-features = false }

# We don't depend on this crate directly, but we need to enable certain features when wasm is required
getrandom = "0.2"
getrandom = { version = "0.2", optional = true }

[dev-dependencies]
rand = "0.8"
@@ -47,7 +47,7 @@ curve-secp256k1 = ["curves", "generic-ec-curves/secp256k1"]
curve-secp256r1 = ["curves", "generic-ec-curves/secp256r1"]
curve-stark = ["curves", "generic-ec-curves/stark"]
curve-ed25519 = ["curves", "generic-ec-curves/ed25519"]
all-curves = ["curve-secp256k1", "curve-secp256r1", "curve-stark"]
all-curves = ["curve-secp256k1", "curve-secp256r1", "curve-stark", "curve-ed25519"]

wasm = ["getrandom/js"]

1 change: 1 addition & 0 deletions generic-ec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -184,6 +184,7 @@ extern crate alloc;

// We do not use getrandom directly, we just need to enable certain features
// when `wasm` is required
#[cfg(feature = "wasm")]
use getrandom as _;

pub use generic_ec_core as core;