We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7aed17e commit 8ac79d4Copy full SHA for 8ac79d4
Cargo.toml
@@ -35,6 +35,8 @@ wasi = "0.9"
35
36
[features]
37
std = []
38
+# Feature to enable fallback CPU-based implementation
39
+cpu = []
40
# Feature to enable custom RNG implementations
41
custom = []
42
# Unstable feature to support being a libstd dependency
src/lib.rs
@@ -185,6 +185,8 @@ cfg_if! {
185
#[path = "rdrand.rs"] mod imp;
186
} else if #[cfg(feature = "custom")] {
187
use custom as imp;
188
+ } else if #[cfg(all(feature = "cpu", target_arch = "x86_64"))] {
189
+ #[path = "rdrand.rs"] mod imp;
190
} else {
191
compile_error!("\
192
target is not supported, for more information see: \
0 commit comments