Guide

This section attempts to explain some of the concepts used in this library.

  1. Getting started with a new crate
  2. What is random data and what is randomness anyway?
  3. What kind of random generators are there?
  4. What random number generators does Rand provide?
  5. Seeding PRNGs and reproducibility
  6. Parallel RNGs
  7. Turning random data into useful values
  8. Distributions: more control over random values
  9. Random processes: sampling without replacement
  10. Sequences
  11. Error handling
  12. Testing functions which use RNGs

Importing items (prelude)

The most convenient way to import items from Rand is to use the prelude. This includes the most important parts of Rand, but only those unlikely to cause name conflicts.

Note that Rand 0.5 has significantly changed the module organization and contents relative to previous versions. Where possible old names have been kept (but are hidden in the documentation), however these will be removed in the future. We therefore recommend migrating to use the prelude or the new module organization in your imports.

Further examples

For some inspiration, see the example applications: