diff --git a/README.md b/README.md index 70da00b..46ea830 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,16 @@ let rng = fastrand::Rng::new(); let mut bytes: Vec = repeat_with(|| rng.u8(..)).take(10_000).collect(); ``` +This crate aims to expose a core set of useful randomness primitives. For more niche algorithms, consider using the [`fastrand-contrib`] crate alongside this one. + # Features - `std` (enabled by default): Enables the `std` library. This is required for the global generator and global entropy. Without this feature, [`Rng`] can only be instantiated using - the [`with_seed`](Rng::with_seed) method. + the [`with_seed`](https://docs.rs/fastrand/latest/fastrand/struct.Rng.html#method.with_seed) method. +- `js`: Assumes that WebAssembly targets are being run in a JavaScript environment. + +[`fastrand-contrib`]: https://crates.io/crates/fastrand-contrib ## License diff --git a/src/lib.rs b/src/lib.rs index c04385d..24de8dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,9 @@ //! let mut bytes: Vec = repeat_with(|| rng.u8(..)).take(10_000).collect(); //! ``` //! +//! This crate aims to expose a core set of useful randomness primitives. For more niche algorithms, +//! consider using the [`fastrand-contrib`] crate alongside this one. +//! //! # Features //! //! - `std` (enabled by default): Enables the `std` library. This is required for the global @@ -92,6 +95,7 @@ //! entropy sources and seed the global RNG. If the `js` feature is not enabled, the global RNG will //! use a predefined seed. //! +//! [`fastrand-contrib`]: https://crates.io/crates/fastrand-contrib //! [`getrandom`]: https://crates.io/crates/getrandom #![cfg_attr(not(feature = "std"), no_std)]