From 9eb0ada6754318f3d684b1b5293b2bd627a273d2 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 26 Feb 2025 14:22:59 -0700 Subject: [PATCH 1/3] make rand optional --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 78f59df..ec8db1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT/Apache-2.0" edition = "2021" [dependencies] -rand = { version = "0.8", default-features = false, features = ["std_rng"]} +rand = { version = "0.8", optional = true, default-features = false, features = ["std_rng"]} rayon = { version = "1", optional = true } colored = { version = "2", optional = true } num-traits = { version = "0.2", default-features = false } From abc512310d30b324b58ad6c6c45f7249b3a36ca9 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 26 Feb 2025 14:30:53 -0700 Subject: [PATCH 2/3] more feature gates --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 4d59f70..67eba15 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,7 +50,9 @@ pub mod sync { pub use std::sync::*; } +#[cfg(feature = "std")] mod rand_helper; +#[cfg(feature = "std")] pub use rand_helper::*; pub mod perf_trace; From b738e4f7ce28cebb7e42e99fef6dfd1d0519ab0e Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 26 Feb 2025 14:37:56 -0700 Subject: [PATCH 3/3] changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9368454..e4f9394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Pending +Set the Rand depenency to optional + ### Breaking changes ### Features