Differentiate no-std from alloc within tests/no-std

Fixes `no-std` builds for packages which intended to be `no-std` (without
`alloc`).

Updates a variety of MSRVs to 1.73 due to `flexible-transcript` no longer using
`std-shims` to achieve 1.66 (as `std-shims` requires `alloc`). A future
improvement would be for `std-shims` to have an `alloc` feature and only
provide MSRV shims without it.
This commit is contained in:
Luke Parker
2025-08-29 01:07:11 -04:00
parent 0c71b6fc4d
commit 12cfa6b2a5
17 changed files with 71 additions and 43 deletions

View File

@@ -19,23 +19,45 @@ workspace = true
[dependencies]
flexible-transcript = { path = "../../crypto/transcript", default-features = false, features = ["recommended", "merlin"] }
multiexp = { path = "../../crypto/multiexp", default-features = false, features = ["batch"], optional = true }
dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = false }
minimal-ed448 = { path = "../../crypto/ed448", default-features = false }
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["alloc"] }
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false }
multiexp = { path = "../../crypto/multiexp", default-features = false, features = ["batch"] }
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false, optional = true }
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false }
prime-field = { path = "../../crypto/prime-field", default-features = false, features = ["alloc"] }
short-weierstrass = { path = "../../crypto/short-weierstrass", default-features = false, features = ["alloc"] }
prime-field = { path = "../../crypto/prime-field", default-features = false }
short-weierstrass = { path = "../../crypto/short-weierstrass", default-features = false }
secq256k1 = { path = "../../crypto/secq256k1", default-features = false }
embedwards25519 = { path = "../../crypto/embedwards25519", default-features = false }
dkg = { path = "../../crypto/dkg", default-features = false }
dkg-evrf = { path = "../../crypto/dkg/evrf", default-features = false }
dkg = { path = "../../crypto/dkg", default-features = false, optional = true }
dkg-evrf = { path = "../../crypto/dkg/evrf", default-features = false, features = ["secp256k1", "ed25519", "ristretto"], optional = true }
# modular-frost = { path = "../../crypto/frost", default-features = false }
# frost-schnorrkel = { path = "../../crypto/schnorrkel", default-features = false }
bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, features = ["hazmat"] }
bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, features = ["hazmat"], optional = true }
[features]
alloc = [
"multiexp",
"dalek-ff-group/alloc",
"minimal-ed448/alloc",
"ciphersuite/alloc",
"schnorr-signatures",
"prime-field/alloc",
"short-weierstrass/alloc",
"secq256k1/alloc",
"embedwards25519/alloc",
"dkg",
"dkg-evrf",
"bitcoin-serai",
]

View File

@@ -7,20 +7,22 @@ pub use minimal_ed448;
pub use ciphersuite;
pub use multiexp;
pub use schnorr_signatures;
pub use prime_field;
pub use short_weierstrass;
pub use secq256k1;
pub use embedwards25519;
pub use dkg;
pub use dkg_evrf;
/*
pub use modular_frost;
pub use frost_schnorrkel;
*/
pub use bitcoin_serai;
#[cfg(feature = "alloc")]
pub mod alloc {
pub use multiexp;
pub use schnorr_signatures;
pub use dkg;
pub use dkg_evrf;
pub use bitcoin_serai;
}