Skip to content

chore(deps): update cargo dependencies#104

Merged
tclem merged 1 commit intomainfrom
deps/cargo-updates-2026-03-12
Mar 12, 2026
Merged

chore(deps): update cargo dependencies#104
tclem merged 1 commit intomainfrom
deps/cargo-updates-2026-03-12

Conversation

@tclem
Copy link
Member

@tclem tclem commented Mar 12, 2026

Updates rand and rand_chacha from 0.9 to 0.10 across all workspace crates. Both are major version bumps but the blast radius is limited -- rand is only used in test helpers, benchmarks, and behind an optional feature flag in bpe.

Updated packages

Package Old New Crates affected
rand 0.9 0.10 bpe, geo_filters, string-offsets, bpe-tests, bpe-benchmarks
rand_chacha 0.9 0.10 geo_filters, string-offsets

Code changes

rand 0.10 reorganized its trait hierarchy, requiring updates to imports and trait bounds across 8 source files:

  • random() and random_range() moved from Rng to a new RngExt trait
  • The base trait was renamed from RngCore to Rng in rand_core
  • RngCore is no longer re-exported from the rand crate
  • StdRng::from_os_rng() was removed in favor of rand::make_rng()

Validation

  • make lint -- passes (fmt + clippy)
  • make test -- all tests pass
  • make build -- full workspace build succeeds

Supersedes #100 and #101.

Updated packages:
 0.10 (major)
 0.10 (major)

Fixed breaking changes:
- rand 0.10 moved random()/random_range() from Rng to RngExt trait
 Rng (in rand_core)
- rand 0.10 removed RngCore re-export from rand crate
 rand::make_rng()

Supersedes: #100, #101

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tclem tclem requested a review from a team as a code owner March 12, 2026 15:43
Copilot AI review requested due to automatic review settings March 12, 2026 15:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the workspace to rand/rand_chacha 0.10 and applies the corresponding API migrations (trait renames, RNG construction helpers) across library code, tests, and benchmarks.

Changes:

  • Bump rand and rand_chacha from 0.9 to 0.10 in affected crates.
  • Update RNG-related imports and trait bounds to match rand 0.10 (RngExt, rand::make_rng(), rand::Rng for next_u64()-style APIs).
  • Adjust test/benchmark code to compile against the new rand API surface.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/string-offsets/benchmarks/performance.rs Switches benchmark RNG trait import to RngExt for random_range().
crates/string-offsets/Cargo.toml Updates dev-dependency versions for rand and rand_chacha.
crates/geo_filters/src/evaluation/simulation.rs Updates rand trait import and replaces StdRng::from_os_rng() with rand::make_rng().
crates/geo_filters/src/distinct_count.rs Updates test-only RNG trait import to the new rand::Rng (aliased).
crates/geo_filters/src/diff_count.rs Updates RNG trait imports in test-support code and tests for rand/rand_chacha 0.10.
crates/geo_filters/src/config/lookup.rs Updates test-only RNG trait import to the new rand::Rng (aliased).
crates/geo_filters/src/config.rs Updates test-only RNG trait import to the new rand::Rng (aliased).
crates/geo_filters/Cargo.toml Updates optional + dev dependency versions for rand and rand_chacha.
crates/bpe/tests/src/lib.rs Updates tests to use RngExt for random_range().
crates/bpe/tests/Cargo.toml Updates rand dev-dependency to 0.10.
crates/bpe/src/byte_pair_encoding.rs Migrates rand usage to RngExt and updates the public encode_minimal_dropout bound accordingly.
crates/bpe/benchmarks/performance.rs Updates benchmark RNG usage to RngExt and removes now-unneeded imports.
crates/bpe/benchmarks/Cargo.toml Updates rand benchmark dependency to 0.10.
crates/bpe/Cargo.toml Updates optional rand dependency to 0.10.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tclem tclem merged commit fca871b into main Mar 12, 2026
11 checks passed
@tclem tclem deleted the deps/cargo-updates-2026-03-12 branch March 12, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants