Module rngs

Random number generators and adapters

This crate provides a small selection of non-portable generators. See also Types of generators and Our RNGs in the book.

Generators

This crate provides a small selection of non-portable random number generators:

The algorithms selected for StdRng and SmallRng may change in any release and may be platform-dependent, therefore they are not reproducible.

Additional generators

For more, search crates with the rng tag.

Traits and functionality

All generators implement RngCore and thus also [Rng][crate::Rng]. See also the Random Values chapter in the book.

Secure RNGs may additionally implement the CryptoRng trait.

Use the rand_core crate when implementing your own RNGs.

Modules