Crate features / getrandom
Feature flags · getrandom 0.4.3 · from crates.io 2026-10-24
getrandom features: what each one does, and the line to copy
Short answergetrandom 0.4.3 has 3 features. Nothing is on by default: turn on what you use. It needs Rust 1.85 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
std | nothing else (a switch the code checks) | |
sys_rng | dep:rand_core | |
wasm_js | dep:wasm-bindgen, dep:js-sys |
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 getrandom declares (rust-version), and the release that changed it:
- 0.3.0-rc.0 (2024-11-29): Rust 1.63
- 0.2.16 (2025-04-22): no rust-version declared
- 0.3.3 (2025-05-09): Rust 1.63
- 0.4.0-rc.0 (2025-12-27): Rust 1.85
- 0.2.17 (2026-01-11): no rust-version declared
- 0.4.0-rc.1 (2026-01-24): Rust 1.85
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p getrandom --precise <version>, or use resolver 3, which picks compatible versions for you.
More on getrandom
Real downloads, dependents and alternatives: getrandom crate data (7.6M real downloads a day, 5,558 dependents).
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2024
Up next
Before you depend on itgetrandom crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?