Cargo Features

[dependencies]
rands = { version = "0.8.8", default-features = false, features = ["nightly", "serde1", "std", "alloc", "getrandom", "simd_support", "std_rng", "small_rng", "min_const_gen", "log"] }
default = std, std_rng

Meta-features:

nightly

enables performance optimizations requiring nightly rust

serde1 = serde

Enables serde1 of rand_core

std default = alloc, getrandom, libc

Option (enabled by default): without "std" rand uses libcore; this option enables functionality expected to be available on a standard platform.

Enables std of rand_chacha and rand_core

Affects rngs::adapter, index::sample_weighted, seq::SliceRandom.choose_multiple_weighted, rands::random

alloc std

Option: "alloc" enables support for Vec and Box when not using "std"

Enables alloc of rand_core

Affects distribution::DistString, distributions::weighted, seq::index, seq::SliceRandom.choose_multiple, seq::SliceRandom.choose_weighted, seq::SliceRandom.choose_weighted_mut, seq::IteratorRandom.choose_multiple, seq::SliceChooseIter

getrandom std

Option: use getrandom package for seeding

Enables getrandom of rand_core

simd_support = packed_simd

Option (requires nightly): experimental SIMD support

std_rng default = rand_chacha

Option (enabled by default): enable StdRng

Affects rands::random

small_rng

Option: enable SmallRng

min_const_gen

Option: for rustc ≥ 1.51, enable generating random arrays of any size using min-const-generics

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

log implicit feature

Enables log

log:

A lightweight logging facade for Rust

serde serde1?
rand_chacha std std_rng
libc unix std
packed_simd simd_support?

Enables packed_simd_2