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 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 } 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;