Skip to content

Latest commit

 

History

History
306 lines (242 loc) · 13.1 KB

File metadata and controls

306 lines (242 loc) · 13.1 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.10.0 - 2026-02-01

This release makes a number of significant changes which we hope will be the last significant breakage before 1.0. Code has moved from the rust-random/rand repository to its own rust-random/rand_core.

User-facing API changes

Changed

  • Edition changed to 2024 and MSRV bumped to 1.85 (rand#1668)
  • RngCore and TryRngCore are renamed to Rng and TryRng respectively (#54)
  • Rng is now an extension trait of TryRng<Error = Infallible> (#45)
  • TryRng::Error is bound on core::error::Error instead of Debug + Display (#58)
  • Relax Sized bound on impls of SeedableRng (rand#1641)

Added

  • SeedableRng::{fork, try_fork} methods (#17)
  • Re-export of core::convert::Infallible (#56)

Removed

  • TryRng::read_adapter method (replaced with rand::RngReader) (rand#1669)
  • os_rng crate feature (rand#1674)
  • OsRng and OsError structs (rand#1674)
  • SeedableRng::from_os_rng and SeedableRng::try_from_os_rng methods (rand#1674)
  • getrandom dependency (rand#1674)
  • std crate feature (rand#1674)
  • Optional serde dependency (#28)
  • UnwrapMut struct and Rng::unwrap_mut method (#45)
  • Rng::unwrap_err method in favor of explicit wrapping in UnwrapErr (#53)

API changes to PRNG implementation helpers

Added

  • BlockRng::reconstruct and BlockRng::remaining_results methods (#36)
  • block::Generator::drop method (#35)
  • BlockRng::word_offset method (#44)

Changed

  • Replaced le helper functions with new utils helpers (rand#1667, #34, #38, #45)
  • Rename BlockRng::generate_and_set method to reset_and_skip (#44)
  • Rename block::BlockRngCore trait to block::Generator (#26)
  • Rename BlockRngCore::Results associated type to Output and remove type bounds on it (#26)

Removed

  • Implementation of Rng for BlockRng, making the latter more generic (#34)
  • BlockRng64 struct (#34)
  • BlockRng::reset method (#44)
  • BlockRng::index method (replaced with BlockRng::word_offset) (#44)
  • Generator::Item associated type (#26)
  • CryptoBlockRng (#69)

0.9.3 - 2025-02-29

Other

  • Remove zerocopy dependency (rand#1607)
  • Deprecate rand_core::impls::fill_via_u32_chunks, fill_via_u64_chunks (rand#1607)

0.9.2 - 2025-02-22

API changes

  • Relax Sized bound on impls of TryRngCore, TryCryptoRng and UnwrapMut (rand#1593)
  • Add UnwrapMut::re to reborrow the inner rng with a tighter lifetime (rand#1595)

0.9.1 - 2025-02-16

API changes

  • Add TryRngCore::unwrap_mut, providing an impl of RngCore over &mut rng (rand#1589)

0.9.0 - 2025-01-27

Dependencies and features

API changes

  • Allow rand_core::impls::fill_via_u*_chunks to mutate source (rand#1182)
  • Add fn RngCore::read_adapter implementing std::io::Read (rand#1267)
  • Add trait CryptoBlockRng: BlockRngCore; make trait CryptoRng: RngCore replacing CryptoRngCore (rand#1273)
  • Add traits TryRngCore, TryCryptoRng (rand#1424, rand#1499)
  • Rename fn SeedableRng::from_rng -> try_from_rng and add infallible variant fn from_rng (rand#1424)
  • Rename fn SeedableRng::from_entropy -> from_os_rng and add fallible variant fn try_from_os_rng (rand#1424)
  • Add bounds Clone and AsRef to associated type SeedableRng::Seed (rand#1491)

0.6.4 - 2022-09-15

  • Fix unsoundness in <BlockRng64 as RngCore>::next_u32 (rand#1160)
  • Reduce use of unsafe and improve gen_bytes performance (rand#1180)
  • Add CryptoRngCore trait (rand#1187, rand#1230)

0.6.3 - 2021-06-15

Changed

0.6.2 - 2021-02-12

Fixed

  • Fixed assertions in le::read_u32_into and le::read_u64_into which could have allowed buffers not to be fully populated (rand#1096)

0.6.1 - 2021-01-03

Fixed

  • Avoid panic when using RngCore::seed_from_u64 with a seed which is not a multiple of four (rand#1082)

Other

  • Enable all stable features in the playground (rand#1081)

0.6.0 - 2020-12-08

Breaking changes

  • Bump MSRV to 1.36, various code improvements (rand#1011)
  • Update to getrandom v0.2 (rand#1041)
  • Fix: next_u32_via_fill and next_u64_via_fill now use LE as documented (rand#1061)

Other

0.5.1 - 2019-08-28

  • OsRng added to rand_core (rand#863)
  • Error::INTERNAL_START and Error::CUSTOM_START constants (rand#864)
  • Error::raw_os_error method (rand#864)
  • Debug and Display formatting for getrandom error codes without std (rand#864)

Changed

  • alloc feature in no_std is available since Rust 1.36 (rand#856)
  • Added #[inline] to Error conversion methods (rand#864)

0.5.0 - 2019-06-06

Changed

0.4.0 - 2019-01-24

Changed

  • Disable the std feature by default (rand#702)

0.3.0 - 2018-09-24

Added

  • Add SeedableRng::seed_from_u64 for convenient seeding. (rand#537)

0.2.1 - 2018-06-08

Added

  • References to a CryptoRng now also implement CryptoRng. (rand#470)

0.2.0 - 2018-05-21

Changed

  • Enable the std feature by default. (rand#409)
  • Remove BlockRng{64}::inner and BlockRng::inner_mut; instead making core public
  • Change BlockRngCore::Results bound to also require AsMut<[Self::Item]>. (rand#419)

Added

  • Add BlockRng{64}::index and BlockRng{64}::generate_and_set. (rand#374, rand#419)
  • Implement std::io::Read for RngCore. (rand#434)

0.1.0 - 2018-04-17

(Split out of the Rand crate, changes here are relative to rand 0.4.2.)

Added

  • RngCore and SeedableRng are now part of rand_core. (rand#288)
  • Add modules to help implementing RNGs impl and le. (rand#209, rand#228)
  • Add Error and ErrorKind. (rand#225)
  • Add CryptoRng marker trait. (rand#273)
  • Add BlockRngCore trait. (rand#281)
  • Add BlockRng and BlockRng64 wrappers to help implementations. (rand#281, rand#325)
  • Add RngCore::try_fill_bytes. (rand#225)

Changed

  • Revise the SeedableRng trait. (rand#233)
  • Remove default implementations for RngCore::next_u64 and RngCore::fill_bytes. (rand#288)