The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech Leads28-29 May

Join

Rand

Test Status Crate Book API

Rand is a set of crates supporting (pseudo-)random generators:

With broad support for random value generation and random processes:

All with:

Rand is not:

Documentation:

Versions

Rand is mature (suitable for general usage, with infrequent breaking releases which minimise breakage) but not yet at 1.0. Current MAJOR.MINOR versions are:

See the CHANGELOG or Upgrade Guide for more details.

Crate Features

Rand is built with these features enabled by default:

Optionally, the following dependencies can be enabled:

Additionally, these features configure Rand:

Portability

Reproducibility

Achieving reproducible results requires not only deterministic algorithms with fixed inputs but also a commitment to stability of algorithms and some platform-specific considerations. A subset of rand does aim to support reproducibility; read more about this in the book: Portability.

WebAssembly support

The WASI and Emscripten targets are directly supported. The wasm32-unknown-unknown target is not automatically supported. To enable support for this target, refer to the getrandom documentation for WebAssembly. Alternatively, the sys_rng feature may be disabled.

License

Rand is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.