From a82ccadbb0a889a925acf4c146e3d635a543252d Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 15 Sep 2025 21:59:58 -0400 Subject: [PATCH] Correct `std-shims` feature flagging --- common/std-shims/src/sync.rs | 2 ++ crypto/dkg/Cargo.toml | 2 +- crypto/dkg/dealer/Cargo.toml | 2 +- crypto/dkg/evrf/Cargo.toml | 2 +- crypto/dkg/musig/Cargo.toml | 2 +- crypto/multiexp/Cargo.toml | 2 +- networks/bitcoin/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/std-shims/src/sync.rs b/common/std-shims/src/sync.rs index 7857c50d..6ef7f478 100644 --- a/common/std-shims/src/sync.rs +++ b/common/std-shims/src/sync.rs @@ -1,6 +1,8 @@ pub use core::sync::atomic; #[cfg(all(feature = "alloc", not(feature = "std")))] pub use extern_alloc::sync::{Arc, Weak}; +#[cfg(feature = "std")] +pub use std::sync::{Arc, Weak}; mod mutex_shim { #[cfg(not(feature = "std"))] diff --git a/crypto/dkg/Cargo.toml b/crypto/dkg/Cargo.toml index 602e3318..1c6e3073 100644 --- a/crypto/dkg/Cargo.toml +++ b/crypto/dkg/Cargo.toml @@ -21,7 +21,7 @@ zeroize = { version = "^1.5", default-features = false, features = ["zeroize_der thiserror = { version = "2", default-features = false } -std-shims = { version = "0.1", path = "../../common/std-shims", default-features = false } +std-shims = { version = "0.1", path = "../../common/std-shims", default-features = false, features = ["alloc"] } borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"], optional = true } diff --git a/crypto/dkg/dealer/Cargo.toml b/crypto/dkg/dealer/Cargo.toml index c945c55f..f12a07d0 100644 --- a/crypto/dkg/dealer/Cargo.toml +++ b/crypto/dkg/dealer/Cargo.toml @@ -20,7 +20,7 @@ workspace = true zeroize = { version = "^1.5", default-features = false } rand_core = { version = "0.6", default-features = false } -std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false } +std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false, features = ["alloc"] } ciphersuite = { path = "../../ciphersuite", version = "^0.4.1", default-features = false } dkg = { path = "../", version = "0.6", default-features = false } diff --git a/crypto/dkg/evrf/Cargo.toml b/crypto/dkg/evrf/Cargo.toml index 21c2e8de..1bf7d831 100644 --- a/crypto/dkg/evrf/Cargo.toml +++ b/crypto/dkg/evrf/Cargo.toml @@ -23,7 +23,7 @@ rand_core = { version = "0.6", default-features = false, features = ["alloc"] } zeroize = { version = "^1.5", default-features = false, features = ["alloc", "zeroize_derive"] } -std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false } +std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false, features = ["alloc"] } transcript = { package = "flexible-transcript", path = "../../transcript", version = "^0.3.2", default-features = false, features = ["recommended"] } diff --git a/crypto/dkg/musig/Cargo.toml b/crypto/dkg/musig/Cargo.toml index 3887368c..7f928685 100644 --- a/crypto/dkg/musig/Cargo.toml +++ b/crypto/dkg/musig/Cargo.toml @@ -23,7 +23,7 @@ rand_core = { version = "0.6", default-features = false } zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] } -std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false } +std-shims = { version = "0.1", path = "../../../common/std-shims", default-features = false, features = ["alloc"] } multiexp = { path = "../../multiexp", version = "0.4", default-features = false } ciphersuite = { path = "../../ciphersuite", version = "^0.4.1", default-features = false } diff --git a/crypto/multiexp/Cargo.toml b/crypto/multiexp/Cargo.toml index f9f46e65..18efef3f 100644 --- a/crypto/multiexp/Cargo.toml +++ b/crypto/multiexp/Cargo.toml @@ -19,7 +19,7 @@ workspace = true [dependencies] rustversion = "1" -std-shims = { path = "../../common/std-shims", version = "^0.1.1", default-features = false } +std-shims = { path = "../../common/std-shims", version = "0.1.1", default-features = false, features = ["alloc"] } zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive", "alloc"] } diff --git a/networks/bitcoin/Cargo.toml b/networks/bitcoin/Cargo.toml index 9147feee..4d220f1d 100644 --- a/networks/bitcoin/Cargo.toml +++ b/networks/bitcoin/Cargo.toml @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] workspace = true [dependencies] -std-shims = { version = "0.1.1", path = "../../common/std-shims", default-features = false } +std-shims = { version = "0.1.1", path = "../../common/std-shims", default-features = false, features = ["alloc"] } thiserror = { version = "2", default-features = false }