NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3 most downloaded on crates.io
A small cross-platform library for retrieving random data from system source
Last release 3 months ago
17 Jun 2026
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 43 of 43 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
48 releases · first in 2019
wasm64-unknown-unknown target support for wasm_js backend #848
wasm64-unknown-unknown target support for wasm_js backend #848wasip2 and wasip3 dependencies in favor of manual bindings #830Bump r-efi dependency to v6 #814
One column per quarter.
Documentation build on docs.rs #801
Prepare v0.4.0 release
Prepare v0.4.0 release (#798)
Renames (Try)RngCore => (Try)Rng
(Try)RngCore => (Try)Rngunwrap_err in example with UnwrapErrPrepare v0.4.0-rc.0
Prepare v0.4.0-rc.0 (#769)
Forgot this because I'm out of practice.
Forgot this because I'm out of practice.
Signed-off-by: Joe Richey joerichey@google.com
wasm_js backendNow, when the wasm_js feature is enabled, the wasm_js backend will be used
by default. Users of wasm32-unknown-unknown targeting JavaScript environments
like the Web and Node.js will no longer need to specify:
--cfg getrandom_backend="wasm_js"
in RUSTFLAGS for the crate to compile. They can now simple enable a feature.
Note: this should not affect non-JS users of the wasm32-unknown-unknown
target. Using --cfg getrandom_backend will still override the source of
randomness even if the wasm_js feature is enabled. This includes
--cfg getrandom_backend=custom and --cfg getrandom_backend=unsupported.
For more information, see the discussions in #671, #675, and #730.
linux_raw opt-in backend on ARM targets #688getrandom syscall on all RISC-V Linux targets #699wasi dependency with wasip2 #721wasm_js backend by default if the wasm_js feature is enabled #730rustc-dep-of-std crate feature #694chore: Release getrandom version 0.3.3
chore: Release getrandom version 0.3.3
linux_raw opt-in backend [#572]
efi_rng opt-in backend #570linux_raw opt-in backend #572.cargo/config.toml example in the crate-level docs #591getrandom_test_linux_without_fallback configuration flag to test that file fallback
is not triggered in the linux_android_with_fallback backend #605*-linux-none targets #618wasi dependency to v0.14 #594#[inline] attribute to the inner functions #596dlsym on MUSL targets in the linux_android_with_fallback backend #602linux_android.rs and use getrandom.rs instead #603RtlGenRandom on Windows targets when compiling with pre-1.78 Rust #610Error type #614windows-targets dependency and use raw-dylib directly #627Error::INTERNAL_START and Error::CUSTOM_START associated constants #614[0.3.1]: https://github.com/rust-random/getrandom/compare/v0.3.0...v0.3.1 [#588]: https://github.com/rust-random/getrandom/pull/588
Rename getrandom and getrandom_uninit functions to fill and fill_uninit respectively [#532]
getrandom and getrandom_uninit functions to fill and fill_uninit respectively #532wasm32-wasi target support (use wasm32-wasip1 or wasm32-wasip2 instead) #499linux_disable_fallback, rdrand, js, test-in-browser, and custom crate features
in favor of configuration flags #504register_custom_getrandom! macro #504From<NonZeroU32> for Error and Error::code method #507Error constants #562ProcessPrng on Windows 10 and up, and use RtlGenRandom on older Windows versions #415strerror_r for retrieving error code descriptions #440usize is the native word size in the rdrand backend #442errno when libc did not indicate error on Solaris #448libpthread's mutex to futex on Linux and to nanosleep-based wait loop
on other targets in the use_file backend #490EAGAIN while polling /dev/random on Linux #522wasm_js backend
(bumps minimum supported Node.js version to v19) #557js_namespace in the wasm_js backend #559wasm32-wasip1 and wasm32-wasip2 support #499getrandom_backend configuration flag for selection of opt-in backends #504Error::new_custom method #507rndr opt-in backend #512u32 and u64 functions for generating random values of the respective type #544wasm32v1-none support in the wasm_js backend #560wasm_js crate feature which allows users to enable the wasm_js opt-in backend #574KERN_ARND #555Nothing published for this version
Release 0.2.17
Cygwin support (backport of #626 ) #654
Use libc::getrandom on DragonflyBSD, FreeBSD, illumos, and Solaris [#411] [#416] [#417] [#420]
Enable /dev/urandom fallback for MUSL-based Linux targets [#408]
/dev/urandom fallback for MUSL-based Linux targets #408linux_disable_fallback crate feature to disable /dev/urandom-based fallback on Linux and Android targets. Enabling this feature bumps minimum supporte
linux_disable_fallback crate feature to disable /dev/urandom-based fallback on Linux and
Android targets. Enabling this feature bumps minimum supported Linux kernel version to 3.17 and
Android API level to 23 (Marshmallow). #396Custom backend for targets without atomics [#385]
Renamed __getrandom_internal to __GETRANDOM_INTERNAL [#369]
Support for PS Vita (armv7-sony-vita-newlibeabihf) [#359]
getrandom_uninit function [#291]
getrandom_uninit function #291wasm64-unknown-unknown support #303getrandom syscall on NetBSD ≥ 10.0 #331RtlGenRandom fallback for non-UWP Windows #337/dev/random source #310open instead of open64 #326sys_read_entropy syscall #333__getrandom_custom definition into a const block #344The [Web Cryptography API] will now be preferred on wasm32-unknown-unknown when using the "js" feature, even on Node.js [#284] [#295]
wasm32-unknown-unknown
when using the "js" feature, even on Node.js #284 #295$crate in register_custom_getrandom! #270Update wasi dependency to 0.11 [#253]
Nintendo 3DS (armv6k-nintendo-3ds) support [#248]
ESP-IDF targets (*‑espidf) support [#245]
Use explicit imports in the js backend [#220]
Replace build.rs with link attributes. [#205]
Forward rustc-dep-of-std to dependencies. [#198]
The following (off by default) Cargo features have been added:
The following (off by default) Cargo features have been added:
"rdrand" - use the RDRAND instruction on no_std x86/x86_64 targets #133"js" - use JavaScript calls on wasm32-unknown-unknown #149
stdweb and wasm-bindgen features (which are removed)"custom" - allows a user to specify a custom implementation #109Error constants #120std traits when the "std" Cargo feature is specified #106"log" dependency #131Implement std::Error for the Error type on additional targets. [#169]
Added support for Internet Explorer 11 [#139]
Remove use of spin-locks in the use_file module. [#125]
If zero-length slice is passed to the getrandom function, always return Ok(()) immediately without doing any calls to the underlying operating system.
Update wasi dependency from v0.5 to v0.7. [#100]
Implement std-dependent traits for selected targets even if std feature is disabled. (backward compatibility with v0.1.8) [#96]
std-dependent traits for selected targets even if std
feature is disabled. (backward compatibility with v0.1.8) #96Use the dummy implementation on wasm32-unknown-unknown even with the disabled dummy feature. [#90]
Remove std dependency for opening and reading files. [#58]
Explicitly specify types to arguments of 'libc::syscall'. [#74]
Support for hermit and l4re. [#61]
Error::raw_os_error method, Error::INTERNAL_START and
Error::CUSTOM_START constants. Use libc for retrieving OS error descriptions. #54lazy_static dependency and use custom structures for lock-free
initialization. #51 #52getrandom() first on FreeBSD. #57Error::UNKNOWN, Error::UNAVAILABLE. #54Minor change of RDRAND AMD bug handling. [#48]
Use shared File instead of shared file descriptor. [#44]
Add support for x86_64-unknown-uefi target by using RDRAND with CPUID feature detection. [#30]
Update for wasm32-unknown-wasi being renamed to wasm32-wasi, and for WASI being categorized as an OS.
wasm32-unknown-wasi being renamed to wasm32-wasi, and for
WASI being categorized as an OS.Add support for wasm32-unknown-wasi target.
wasm32-unknown-wasi target.Enable std functionality for CloudABI by default.
Publish initial implementation.
Publish initial implementation.
Publish an empty template library.
Publish an empty template library.
Your coding agent can read these notes before it upgrades. Set up the MCP server →