You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following features are common to `rand_core`, `rand`, `rand_distr` and potentially some RNG crates:
12
19
13
20
-`std`: opt into functionality dependent on the `std` lib. This is default-enabled except in `rand_core`; for `no_std` usage, use `default-features = false`.
14
21
-`alloc`: enables functionality requiring an allocator (for usage with `no_std`). This is implied by `std`.
15
-
-`serde1`: enables serialization via [`serde`], version 1.0.
16
-
17
-
## Rand features
18
-
19
-
Additional `rand` features:
20
-
21
-
-`small_rng` enables the [`SmallRng`] generator (feature-gated since v0.7).
22
-
-`simd_support`: Experimental support for generating various SIMD types (requires nightly `rustc`).
23
-
-`log` enables a few log messages via [`log`].
24
-
25
-
Note regarding SIMD: the above flag concerns explicit generation of SIMD types
26
-
only and not optimisation. SIMD operations may be used internally regardless of
27
-
this flag; e.g. the ChaCha generator has explicit support for SIMD operations
28
-
internally.
22
+
-`serde`: enables serialization via [`serde`], version 1.0.
29
23
30
24
## rand_distr features
31
25
@@ -36,3 +30,4 @@ performance but may produce different random values, the `std_math` feature
36
30
can be enabled. (Note that any other crate depending on `num-traits`'s `std` feature (default-enabled) will have the same effect.)
Copy file name to clipboardExpand all lines: src/guide-test-fn-rng.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Testing functions that use RNGs
1
+
# Testing functions which use RNGs
2
2
3
3
Occasionally a function that uses random number generators might need to be tested. For functions that need to be tested with test vectors, the following approach might be adapted:
0 commit comments