Skip to content

Rename Rng => RngExt; bump rand_core to v0.10.0-rc-6 - #1717

Merged
dhardy merged 1 commit into
masterfrom
rand_core/v0.10.0-rc-6
Jan 26, 2026
Merged

dhardy merged 1 commit into
masterfrom
rand_core/v0.10.0-rc-6

Conversation

@tarcieri

@tarcieri tarcieri commented Jan 24, 2026 •

Copy link
Copy Markdown
Contributor

This prerelease of rand_core renamed (Try)RngCore => (Try)Rng.

Since rand previously defined an Rng trait, it now needs a new name, and RngExt was the one I saw suggested in rust-random/rand_core#54.

Also bumps:

  • chacha20 v0.10.0-rc.9

  • getrandom v0.4.0-rc.1

  • Added a CHANGELOG.md entry

@tarcieri
tarcieri requested review from dhardy and newpavlov January 24, 2026 18:56
@tarcieri
tarcieri force-pushed the rand_core/v0.10.0-rc-6 branch 3 times, most recently from 5b1d58c to 79d9026 Compare January 24, 2026 19:01
Comment thread rand_pcg/src/pcg128.rs
Comment thread src/distr/integer.rs Outdated
Comment thread src/distr/integer.rs Outdated
@tarcieri
tarcieri force-pushed the rand_core/v0.10.0-rc-6 branch from 6bd71c5 to b7eeedd Compare January 25, 2026 00:55
Comment thread src/distr/other.rs Outdated
@tarcieri
tarcieri force-pushed the rand_core/v0.10.0-rc-6 branch 2 times, most recently from fec5cfa to 70dca8d Compare January 25, 2026 02:33
Comment thread src/distr/distribution.rs Outdated
Comment thread src/distr/slice.rs Outdated
Comment thread src/rng.rs Outdated
Comment thread src/rng.rs Outdated
@dhardy

dhardy commented Jan 25, 2026

Copy link
Copy Markdown
Member

Could you bump the rand and rand_pcg versions too?

@tarcieri

tarcieri commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Versions bumped in f6d2e96.

Do I need to squash? Edit: went ahead and squashed in 85161db

This prerelease of `rand_core` renamed `(Try)RngCore` => `(Try)Rng`.

Since `rand` previously defined an `Rng` trait, it now needs a new name,
and `RngExt` was the one I saw suggested in rust-random/rand_core#54.
@tarcieri
tarcieri force-pushed the rand_core/v0.10.0-rc-6 branch from fd1b1d6 to 85161db Compare January 25, 2026 18:18
@dhardy

dhardy commented Jan 26, 2026

Copy link
Copy Markdown
Member

Do I need to squash?

Not necessarily; I'll use the "squash and merge" strategy if commits are messy.

@dhardy dhardy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@dhardy
dhardy merged commit 15b8880 into master Jan 26, 2026
16 checks passed
@dhardy
dhardy deleted the rand_core/v0.10.0-rc-6 branch January 26, 2026 08:14
cratelyn added a commit to olix0r/kubert that referenced this pull request Apr 17, 2026
this was renamed in rust-random/rand#1717.

this commit updates the lease examples to reflect this.

Signed-off-by: katelyn martin <kate@buoyant.io>
cratelyn added a commit to olix0r/kubert that referenced this pull request Apr 17, 2026
* chore(examples): update references to `sample_iter()`

this was renamed in rust-random/rand#1717.

this commit updates the lease examples to reflect this.

Signed-off-by: katelyn martin <kate@buoyant.io>
hiboma added a commit to hiboma/mde-cli that referenced this pull request Jun 9, 2026
rand 0.10 renamed the `Rng` trait to `RngExt` (rust-random/rand#1717).
Update the import in browser.rs so `rng.random()` resolves again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hiboma added a commit to hiboma/mde-cli that referenced this pull request Jun 9, 2026
* chore(deps): bump rand from 0.9.4 to 0.10.0

Bumps [rand](https://github.com/rust-random/rand) from 0.9.4 to 0.10.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.9.4...0.10.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(auth): migrate to rand 0.10 RngExt trait

rand 0.10 renamed the `Rng` trait to `RngExt` (rust-random/rand#1717).
Update the import in browser.rs so `rng.random()` resolves again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 伊藤 洋也 <hito@pepabo.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
emig added a commit to ferrocene/criticalup that referenced this pull request Aug 10, 2026
0.10.0 introduces following renames:
1. Rename os_rng -> sys_rng, OsRng -> SysRng, OsError -> SysError (#1697)
rust-random/rand#1697

2. Rename Rng -> RngExt as upstream rand_core has renamed RngCore -> Rng (#1717)
rust-random/rand#1717
emig added a commit to ferrocene/criticalup that referenced this pull request Aug 10, 2026
0.10.0 introduces following renames:
1. Rename os_rng -> sys_rng, OsRng -> SysRng, OsError -> SysError (#1697)
rust-random/rand#1697

2. Rename Rng -> RngExt as upstream rand_core has renamed RngCore -> Rng (#1717)
rust-random/rand#1717
samidarko added a commit to senara-solutions/mika that referenced this pull request Sep 2, 2026
…R#2005)

rand 0.10 renamed the extension trait `Rng` to `RngExt` (rust-random/rand#1717)
because upstream `rand_core` renamed `RngCore` to `Rng`. As a result
`use rand::Rng;` now imports the core trait, which has no `random_range`,
breaking `apply_jitter` in the gateway GitHub forwarder.

`crates/mika-gateway/src/github.rs:635` is the only `random_range` caller in
the repo (verified by grep); the other `rand::` usages are the free function
`rand::fill`, which is unchanged in 0.10. The fix is import-only.

Verified: `cargo check -p mika-gateway` and
`cargo clippy --workspace --all-targets -- -D warnings` both pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SseXfaQSJ6EDVKWVYztYoX
samidarko added a commit to senara-solutions/mika that referenced this pull request Sep 2, 2026
* chore(deps): bump rand from 0.9.5 to 0.10.2

Bumps [rand](https://github.com/rust-random/rand) from 0.9.5 to 0.10.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.9.5...0.10.2)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(gateway): migrate rand Rng import to RngExt for rand 0.10 (mika PR#2005)

rand 0.10 renamed the extension trait `Rng` to `RngExt` (rust-random/rand#1717)
because upstream `rand_core` renamed `RngCore` to `Rng`. As a result
`use rand::Rng;` now imports the core trait, which has no `random_range`,
breaking `apply_jitter` in the gateway GitHub forwarder.

`crates/mika-gateway/src/github.rs:635` is the only `random_range` caller in
the repo (verified by grep); the other `rand::` usages are the free function
`rand::fill`, which is unchanged in 0.10. The fix is import-only.

Verified: `cargo check -p mika-gateway` and
`cargo clippy --workspace --all-targets -- -D warnings` both pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SseXfaQSJ6EDVKWVYztYoX

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sami Darko <samidarko@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
BDQ added a commit to Stedi/jsonata-rs that referenced this pull request Sep 7, 2026
rand 0.10 renamed the `Rng` extension trait to `RngExt` (rust-random/rand#1717)
since upstream `rand_core` renamed `RngCore` -> `Rng`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
renovate Bot added a commit to gwennlbh/shapemaker that referenced this pull request Sep 27, 2026
##### [v0.10.3](https://github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#0103--2026-09-20)

##### Fixes

- Fix `WeightedIndex` panic when the sum of float weights is infinite; return `Error::Overflow` instead ([#1808])
- Fix spurious `Error::NonFinite` from `Uniform::new_inclusive` on large finite float ranges such as `0.0..=f64::MAX` ([#1821])
- Fix possible panic due to sampling a deserialized `Uniform<char>` ([#1831])

##### Changes

- Report exact remaining lengths from `WeightedIndex::weights()` and reduce overhead when reading weights ([#1838])

[#1808]: rust-random/rand#1808

[#1821]: rust-random/rand#1821

[#1831]: rust-random/rand#1831

[#1838]: rust-random/rand#1838
##### [v0.10.2](https://github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#0102--2026-07-02)

##### Fixes

- Fix possible memory safety violation due to deserialization of `UniformChar` from bad source ([#1790])

##### Changes

- Document required output order of fn `partial_shuffle` and apply `#[must_use]` ([#1769])
- Avoid usage of `unsafe` in contexts where non-local memory corruption could invalidate contract ([#1791])

[#1769]: rust-random/rand#1769

[#1790]: rust-random/rand#1790

[#1791]: rust-random/rand#1791
##### [v0.10.1](https://github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#0101--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
##### [v0.10.0](https://github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#0100---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

[#1717]: rust-random/rand#1717

[#1722]: rust-random/rand#1722

[#1732]: rust-random/rand#1732

[#1734]: rust-random/rand#1734
##### [v0.9.5](https://github.com/rust-random/rand/releases/tag/0.9.5)

#### What's Changed

- rand v0.9.5: backport [#1790](rust-random/rand#1790) by [@dhardy](https://github.com/dhardy) in [#1803](rust-random/rand#1803)

**Full Changelog**: <rust-random/rand@0.9.4...0.9.5>
##### [v0.9.4](https://github.com/rust-random/rand/releases/tag/0.9.4)

##### Fixes

- Fix doc build ([#1766])

[#1766]: rust-random/rand#1766

**Full Changelog**: <rust-random/rand@0.9.3...0.9.4>
##### [v0.9.3](rust-random/rand@0.9.2...0.9.3)
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