From 7eabd4c40af42882a2d1d6ff2ea40eaadb8b6e7f Mon Sep 17 00:00:00 2001 From: Aditya Kresna Date: Tue, 3 Oct 2023 19:53:34 +0700 Subject: [PATCH] fix(cargo.toml): `no_std` build was broken this is caused by `getrandom` deps behind `rand/std_rng` feature flag --- Cargo.toml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ae06220..0cd58b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ documentation = "https://docs.rs/schnorrkel" keywords = ["cryptography", "ed25519", "curve25519", "signature", "ECC"] categories = ["cryptography", "no-std"] description = "Schnorr VRF, signatures, etc. using the Ristretto group" -exclude = [ ".gitignore", "res/*" ] +exclude = [".gitignore", "res/*"] edition = "2021" [dependencies] @@ -17,7 +17,12 @@ aead = { version = "0.5.2", default-features = false, optional = true } arrayref = { version = "0.3.7", default-features = false } # needs to match parity-scale-code which is "=0.7.0" arrayvec = { version = "0.7.4", default-features = false } -curve25519-dalek = { version = "4.1.0", default-features = false, features = ["digest", "zeroize", "precomputed-tables", "legacy_compatibility"] } +curve25519-dalek = { version = "4.1.0", default-features = false, features = [ + "digest", + "zeroize", + "precomputed-tables", + "legacy_compatibility", +] } subtle = { version = "2.5.0", default-features = false } merlin = { version = "3.0.0", default-features = false } rand_core = { version = "0.6.2", default-features = false } @@ -52,7 +57,7 @@ asm = ["sha2/asm"] serde = ["serde_crate", "serde_bytes", "cfg-if"] # We cannot make getrandom a direct dependency because rand_core makes # getrandom a feature name, which requires forwarding. -getrandom = ["rand_core/getrandom", "rand/std_rng"] +getrandom = ["rand_core/getrandom"] # We thus cannot forward the wasm-bindgen feature of getrandom, # but our consumers could depend upon getrandom and activate its # wasm-bindgen feature themselve, which works due to cargo features @@ -60,4 +65,3 @@ getrandom = ["rand_core/getrandom", "rand/std_rng"] # wasm-bindgen = ["getrandom/wasm-bindgen"] # See https://github.com/rust-lang/cargo/issues/9210 # and https://github.com/w3f/schnorrkel/issues/65#issuecomment-786923588 -