Skip to content

chore(deps): bump rand from 0.9.4 to 0.10.1 - #263

Merged
alpergundogdu merged 2 commits into
mainfrom
dependabot/cargo/rand-0.10.1
Apr 22, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
dependabot/cargo/rand-0.10.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

Bumps rand from 0.9.4 to 0.10.1.

Changelog

Sourced from rand's changelog.

[0.10.1] — 2026-02-11

This release includes a fix for a soundness bug; see #1763.

Changes

  • Document panic behavior of make_rng and add #[track_caller] (#1761)
  • Deprecate feature log (#1763)

#1761: rust-random/rand#1761 #1763: rust-random/rand#1763

[0.10.0] - 2026-02-08

Changes

  • The dependency on rand_chacha has been replaced with a dependency on chacha20. This changes the implementation behind StdRng, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in chacha20 instead of rand_chacha (#1642).
  • Rename fns IndexedRandom::choose_multiple -> sample, choose_multiple_array -> sample_array, choose_multiple_weighted -> sample_weighted, struct SliceChooseIter -> IndexedSamples and fns IteratorRandom::choose_multiple -> sample, choose_multiple_fill -> sample_fill (#1632)
  • Use Edition 2024 and MSRV 1.85 (#1653)
  • Let Fill be implemented for element types, not sliceable types (#1652)
  • Fix OsError::raw_os_error on UEFI targets by returning Option<usize> (#1665)
  • Replace fn TryRngCore::read_adapter(..) -> RngReadAdapter with simpler struct RngReader (#1669)
  • Remove fns SeedableRng::from_os_rng, try_from_os_rng (#1674)
  • Remove Clone support for StdRng, ReseedingRng (#1677)
  • Use postcard instead of bincode to test the serde feature (#1693)
  • Avoid excessive allocation in IteratorRandom::sample when amount is much larger than iterator size (#1695)
  • Rename os_rng -> sys_rng, OsRng -> SysRng, OsError -> SysError (#1697)
  • Rename Rng -> RngExt as upstream rand_core has renamed RngCore -> Rng (#1717)

Additions

  • Add fns IndexedRandom::choose_iter, choose_weighted_iter (#1632)
  • Pub export Xoshiro128PlusPlus, Xoshiro256PlusPlus prngs (#1649)
  • Pub export ChaCha8Rng, ChaCha12Rng, ChaCha20Rng behind chacha feature (#1659)
  • Fn rand::make_rng() -> R where R: SeedableRng (#1734)

Removals

  • Removed ReseedingRng (#1722)
  • Removed unused feature "nightly" (#1732)
  • Removed feature small_rng (#1732)

#1632: rust-random/rand#1632 #1642: rust-random/rand#1642 #1649: rust-random/rand#1649 #1652: rust-random/rand#1652 #1653: rust-random/rand#1653 #1659: rust-random/rand#1659 #1665: rust-random/rand#1665 #1669: rust-random/rand#1669 #1674: rust-random/rand#1674 #1677: rust-random/rand#1677 #1693: rust-random/rand#1693 #1695: rust-random/rand#1695 #1697: rust-random/rand#1697

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Dependabot: a dependency update rust Dependabot: a Cargo update; use area: labels for Rust code otherwise labels Apr 21, 2026
@dependabot
dependabot Bot force-pushed the dependabot/cargo/rand-0.10.1 branch from a9a54e5 to 20fb412 Compare April 22, 2026 14:25
@dependabot
dependabot Bot force-pushed the dependabot/cargo/rand-0.10.1 branch from 20fb412 to 147e20b Compare April 22, 2026 14:33
iroh 0.97 still pins `rand_core 0.9.5`, so rand 0.10's `ThreadRng`
does not satisfy iroh's `CryptoRng` bound on `SecretKey::generate`
(the two versions of the `rand_core::CryptoRng` trait are
incompatible). Bypass the trait-version mismatch by drawing 32 random
bytes from `rand::rng().fill_bytes(..)` and feeding them to
`SecretKey::from_bytes`, which carries no rand dependency.

Introduces a small `fresh_secret_key` / `fresh_key` helper in
`node::identity`, `node::tests::probe_loopback`, and
`gossip::validation::tests` to keep the call-site noise local to each
module. Once iroh bumps rand to 0.10 we can revert to
`SecretKey::generate(&mut rand::rng())` — the helpers are a small,
localised compat shim, not a new abstraction.

Also swaps the `use rand::RngCore` imports for `use rand::Rng` since
rand 0.10 renamed the core trait (`RngCore` -> `Rng` at the
rand_core layer) and left `RngCore` as a deprecated blanket alias.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu
alpergundogdu merged commit b74c19a into main Apr 22, 2026
11 checks passed
@alpergundogdu
alpergundogdu deleted the dependabot/cargo/rand-0.10.1 branch April 22, 2026 14:42
alpergundogdu added a commit that referenced this pull request Apr 22, 2026
Resolves Cargo.lock conflicts from main's dependency churn (rand
0.9 → 0.10 in #263, webpki-root-certs 1.0.6 unification). Took
main's lockfile and let `cargo build` reconcile the new admin-only
deps (jsonrpsee, serde_json) so versions stay pinned consistently
with what the rest of the workspace now uses.

Cargo.toml auto-merged: kept this branch's `serde_json` and
`jsonrpsee` additions, picked up main's `rand = "0.10"` bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependabot: a dependency update rust Dependabot: a Cargo update; use area: labels for Rust code otherwise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant