# What changed in rand

> 43 changes in rand 0.8 to 0.10 from its official release notes, upgrade guides and advisories: 23 breaking, 1 deprecations, 2 security, 8 new APIs and options. Each one cited. Sources checked 2026-11-30. HTML: https://unstale.sh/cargo/rand/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## rand 0.10

### Breaking changes

- Applies #[must_use] to partial_shuffle, so unused results are flagged by the compiler. (0.10.2) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.2)
- ChaCha types used directly are now from chacha20 instead of rand_chacha, which may require API changes. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Fill is now implemented for element types rather than sliceable types. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- SliceChooseIter is renamed to IndexedSamples. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- The minimum supported Rust version is now 1.85. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- The unused nightly feature has been removed. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- On UEFI targets, raw_os_error now returns Option<usize>. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- The dependency behind StdRng changed from rand_chacha to chacha20; output remains the same, but directly using ChaCha types may involve API breakage. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- ReseedingRng has been removed. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- ReseedingRng no longer supports Clone; the type is also removed. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Rng is renamed to RngExt, following rand_core's rename of RngCore to Rng. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- RngReader replaces TryRngCore::read_adapter(..) -> RngReadAdapter with a simpler struct. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- IndexedRandom::choose_multiple and IteratorRandom::choose_multiple are renamed to sample. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- IndexedRandom::choose_multiple_array is renamed to sample_array. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- IteratorRandom::choose_multiple_fill is renamed to sample_fill. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- IndexedRandom::choose_multiple_weighted is renamed to sample_weighted. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- SeedableRng::from_os_rng and try_from_os_rng have been removed. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- The small_rng feature has been removed. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- StdRng no longer supports Clone. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- os_rng is renamed to sys_rng. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- OsError is renamed to SysError. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- OsRng is renamed to SysRng. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)

### Security

- Fixes a possible memory safety violation when deserializing UniformChar from a bad source. (0.10.2) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.2)
- Rand is unsound with a custom logger using rand::rng() (0.8.6, 0.9.3, 0.10.1) — [security advisory](https://github.com/advisories/GHSA-CQ8V-F236-94QC)

### Deprecations

- The log feature is deprecated. (0.8.6, 0.9.3, 0.10.1) — [release notes](https://github.com/rust-random/rand/releases/tag/0.8.6), [release notes](https://github.com/rust-random/rand/releases/tag/0.10.1), [release notes](https://github.com/rust-random/rand/releases/tag/0.9.3)

### New APIs and options

- ChaCha12Rng is now publicly exported behind the chacha feature. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- ChaCha20Rng is now publicly exported behind the chacha feature. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- ChaCha8Rng is now publicly exported behind the chacha feature. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Adds IndexedRandom::choose_iter. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Adds IndexedRandom::choose_weighted_iter. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Adds rand::make_rng() for R where R: SeedableRng. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Xoshiro128PlusPlus is now publicly exported. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)
- Xoshiro256PlusPlus is now publicly exported. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)

### Performance

- Reports exact remaining lengths and reduces overhead when reading weights. (0.10.3) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.3)
- Avoids excessive allocation when amount is much larger than the iterator size. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)

### Tooling

- The project now uses Edition 2024. (0.10.0) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.0)

### Fixes and other changes

- Deserialized UniformDuration state is validated to avoid panics and ~infinite loops. (0.10.4) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.4)
- Prevents a possible panic when sampling a deserialized Uniform<char>. (0.10.3) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.3)
- Avoids spurious Error::NonFinite errors on large finite float ranges such as 0.0..=f64::MAX. (0.10.3) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.3)
- Returns Error::Overflow instead of panicking when the sum of float weights is infinite. (0.10.3) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.3)
- Adds #[track_caller] so panics from make_rng report the caller’s location. (0.10.1) — [release notes](https://github.com/rust-random/rand/releases/tag/0.10.1)

## rand 0.8

### Breaking changes

- The experimental simd_support feature is dropped. (0.8.6) — [release notes](https://github.com/rust-random/rand/releases/tag/0.8.6)

### Fixes and other changes

- Fixed the build with no-std and serde1 enabled. (0.8.8) — [release notes](https://github.com/rust-random/rand/releases/tag/0.8.8)
