Crate features / rand
Feature flags · rand 0.10.3 · from crates.io 2026-10-24
rand features: what each one does, and the line to copy
Short answerrand 0.10.3 has 10 features. By default it turns on std, std_rng, sys_rng, thread_rng; add default-features = false to start from nothing. It needs Rust 1.85 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
alloc | nothing else (a switch the code checks) | |
chacha | dep:chacha20 | |
log | nothing else (a switch the code checks) | |
serde | dep:serde | |
simd_support | nothing else (a switch the code checks) | |
std | yes | alloc, getrandom?/std |
std_rng | yes | dep:chacha20 |
sys_rng | yes | dep:getrandom, getrandom/sys_rng |
thread_rng | yes | std, std_rng, sys_rng |
unbiased | nothing else (a switch the code checks) |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version rand declares (rust-version), and the release that changed it:
- 0.9.0-alpha.2 (2024-07-29): Rust 1.61
- 0.9.0-beta.0 (2024-11-26): Rust 1.63
- 0.10.0-rc.0 (2025-09-11): Rust 1.85
- 0.9.3 (2026-04-11): Rust 1.63
- 0.10.1 (2026-04-11): Rust 1.85
- 0.9.4 (2026-04-13): Rust 1.63
- 0.8.6 (2026-04-17): no rust-version declared
- 0.10.2 (2026-07-02): Rust 1.85
- 0.8.7 (2026-07-11): no rust-version declared
- 0.9.5 (2026-07-11): Rust 1.63
- 0.8.8 (2026-08-25): no rust-version declared
- 0.10.3 (2026-09-20): Rust 1.85
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p rand --precise <version>, or use resolver 3, which picks compatible versions for you.
More on rand
Real downloads, dependents and alternatives: rand crate data (5.9M real downloads a day, 33,204 dependents).
Security record: rand advisories.
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2024
Up next
Before you depend on itrand crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?