Skip to content

Releases: rust-random/rand_core

v0.10.0

01 Feb 09:09
0ce22c9

Choose a tag to compare

What's Changed

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)

New Contributors

Full Changelog: v0.9.3...v0.10.0