Update Rust crate getrandom to 0.4 #24

Merged
navicore merged 2 commits from renovate/getrandom-0.x into main 2026-05-28 13:47:27 +00:00
Owner

This PR contains the following updates:

Package Type Update Change
getrandom dependencies minor 0.20.4

Release Notes

rust-random/getrandom (getrandom)

v0.4.2

Compare Source

Changed
  • Bump r-efi dependency to v6 #​814
Fixed
  • Read errno only when it is set #​810
  • Check the return value of ProcessPrng on Windows #​811

v0.4.1

Compare Source

Fixed
  • Documentation build on docs.rs #​801

v0.4.0

Compare Source

Added
Changed
  • Use Edition 2024 and MSRV 1.85 #​749

v0.3.4

Compare Source

Major change to wasm_js backend

Now, when the wasm_js feature is enabled, the wasm_js backend will be used
by default. Users of wasm32-unknown-unknown targeting JavaScript environments
like the Web and Node.js will no longer need to specify:

--cfg getrandom_backend="wasm_js"

in RUSTFLAGS for the crate to compile. They can now simple enable a feature.

Note: this should not affect non-JS users of the wasm32-unknown-unknown
target. Using --cfg getrandom_backend will still override the source of
randomness even if the wasm_js feature is enabled. This includes
--cfg getrandom_backend=custom and --cfg getrandom_backend=unsupported.

For more information, see the discussions in #​671, #​675, and #​730.

Added
  • unsupported opt-in backend #​667
  • windows_legacy opt-in backend #​724
Changed
  • Implement Memory Sanitizer unpoisoning more precisely #​678
  • Relax MSRV for the linux_raw opt-in backend on ARM targets #​688
  • Use getrandom syscall on all RISC-V Linux targets #​699
  • Replaced wasi dependency with wasip2 #​721
  • Enable wasm_js backend by default if the wasm_js feature is enabled #​730
Removed
  • Unstable rustc-dep-of-std crate feature #​694

v0.3.3

Compare Source

Changed
Fixed
  • Error handling in WASI p1 #​661

v0.3.2

Compare Source

Added
  • efi_rng opt-in backend #​570
  • linux_raw opt-in backend #​572
  • .cargo/config.toml example in the crate-level docs #​591
  • getrandom_test_linux_without_fallback configuration flag to test that file fallback
    is not triggered in the linux_android_with_fallback backend #​605
  • Built-in support for *-linux-none targets #​618
  • Cygwin support #​626
Changed
  • Update wasi dependency to v0.14 #​594
  • Add #[inline] attribute to the inner functions #​596
  • Update WASI and Emscripten links in the crate-level docs #​597
  • Do not use dlsym on MUSL targets in the linux_android_with_fallback backend #​602
  • Remove linux_android.rs and use getrandom.rs instead #​603
  • Always use RtlGenRandom on Windows targets when compiling with pre-1.78 Rust #​610
  • Internal representation of the Error type #​614
  • Remove windows-targets dependency and use raw-dylib directly #​627
Removed
  • Error::INTERNAL_START and Error::CUSTOM_START associated constants #​614

v0.3.1

Compare Source

Fixed

v0.3.0

Compare Source

Breaking Changes
Changed
  • Bump MSRV to 1.63 #​542
  • Rename getrandom and getrandom_uninit functions to fill and fill_uninit respectively #​532
Removed
  • wasm32-wasi target support (use wasm32-wasip1 or wasm32-wasip2 instead) #​499
  • linux_disable_fallback, rdrand, js, test-in-browser, and custom crate features
    in favor of configuration flags #​504
  • register_custom_getrandom! macro #​504
  • Implementation of From<NonZeroU32> for Error and Error::code method #​507
  • Internet Explorer 11 support #​554
  • Target-specific associated Error constants #​562
Changed
  • Use ProcessPrng on Windows 10 and up, and use RtlGenRandom on older Windows versions #​415
  • Do not use locale-specific strerror_r for retrieving error code descriptions #​440
  • Avoid assuming usize is the native word size in the rdrand backend #​442
  • Do not read from errno when libc did not indicate error on Solaris #​448
  • Switch from libpthread's mutex to futex on Linux and to nanosleep-based wait loop
    on other targets in the use_file backend #​490
  • Do not retry on EAGAIN while polling /dev/random on Linux #​522
  • Remove separate codepath for Node.js in the wasm_js backend
    (bumps minimum supported Node.js version to v19) #​557
  • Use js_namespace in the wasm_js backend #​559
Added
  • wasm32-wasip1 and wasm32-wasip2 support #​499
  • getrandom_backend configuration flag for selection of opt-in backends #​504
  • Error::new_custom method #​507
  • rndr opt-in backend #​512
  • Automatic MemorySanitizer support #​521 #​571
  • u32 and u64 functions for generating random values of the respective type #​544
  • wasm32v1-none support in the wasm_js backend #​560
  • wasm_js crate feature which allows users to enable the wasm_js opt-in backend #​574
Fixed
  • NetBSD fallback code based on KERN_ARND #​555

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 08:00 AM and 09:59 AM, only on Monday and Thursday (* 8-9 * * 1,4)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [getrandom](https://github.com/rust-random/getrandom) | dependencies | minor | `0.2` → `0.4` | --- ### Release Notes <details> <summary>rust-random/getrandom (getrandom)</summary> ### [`v0.4.2`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#042---2026-03-03) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.4.1...v0.4.2) ##### Changed - Bump `r-efi` dependency to v6 [#&#8203;814] ##### Fixed - Read `errno` only when it is set [#&#8203;810] - Check the return value of `ProcessPrng` on Windows [#&#8203;811] [0.4.2]: https://github.com/rust-random/getrandom/compare/v0.4.1...v0.4.2 [#&#8203;810]: https://github.com/rust-random/getrandom/pull/810 [#&#8203;811]: https://github.com/rust-random/getrandom/pull/811 [#&#8203;814]: https://github.com/rust-random/getrandom/pull/814 ### [`v0.4.1`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#041---2026-02-03) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.4.0...v0.4.1) ##### Fixed - Documentation build on docs.rs [#&#8203;801] [0.4.1]: https://github.com/rust-random/getrandom/compare/v0.4.0...v0.4.1 [#&#8203;801]: https://github.com/rust-random/getrandom/pull/801 ### [`v0.4.0`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#040---2026-02-02) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.3.4...v0.4.0) ##### Added - `RawOsError` type alias [#&#8203;739] - `SysRng` behind new feature `sys_rng` [#&#8203;751] - WASIp3 support [#&#8203;779] - `extern_impl` opt-in backend [#&#8203;786] [#&#8203;794] - Motor OS support [#&#8203;797] ##### Changed - Use Edition 2024 and MSRV 1.85 [#&#8203;749] [0.4.0]: https://github.com/rust-random/getrandom/compare/v0.3.4...v0.4.0 [#&#8203;739]: https://github.com/rust-random/getrandom/pull/739 [#&#8203;749]: https://github.com/rust-random/getrandom/pull/749 [#&#8203;751]: https://github.com/rust-random/getrandom/pull/751 [#&#8203;779]: https://github.com/rust-random/getrandom/pull/779 [#&#8203;786]: https://github.com/rust-random/getrandom/pull/786 [#&#8203;794]: https://github.com/rust-random/getrandom/pull/794 [#&#8203;797]: https://github.com/rust-random/getrandom/pull/797 ### [`v0.3.4`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#034---2025-10-14) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.3.3...v0.3.4) ##### Major change to `wasm_js` backend Now, when the `wasm_js` feature is enabled, the `wasm_js` backend will be used by default. Users of `wasm32-unknown-unknown` targeting JavaScript environments like the Web and Node.js will no longer need to specify: ``` --cfg getrandom_backend="wasm_js" ``` in `RUSTFLAGS` for the crate to compile. They can now simple enable a feature. Note: this should not affect non-JS users of the `wasm32-unknown-unknown` target. Using `--cfg getrandom_backend` will still override the source of randomness *even if* the `wasm_js` feature is enabled. This includes `--cfg getrandom_backend=custom` and `--cfg getrandom_backend=unsupported`. For more information, see the discussions in [#&#8203;671], [#&#8203;675], and [#&#8203;730]. ##### Added - `unsupported` opt-in backend [#&#8203;667] - `windows_legacy` opt-in backend [#&#8203;724] ##### Changed - Implement Memory Sanitizer unpoisoning more precisely [#&#8203;678] - Relax MSRV for the `linux_raw` opt-in backend on ARM targets [#&#8203;688] - Use `getrandom` syscall on all RISC-V Linux targets [#&#8203;699] - Replaced `wasi` dependency with `wasip2` [#&#8203;721] - Enable `wasm_js` backend by default if the `wasm_js` feature is enabled [#&#8203;730] ##### Removed - Unstable `rustc-dep-of-std` crate feature [#&#8203;694] [0.3.4]: https://github.com/rust-random/getrandom/compare/v0.3.3...v0.3.4 [#&#8203;667]: https://github.com/rust-random/getrandom/pull/667 [#&#8203;671]: https://github.com/rust-random/getrandom/issues/671 [#&#8203;675]: https://github.com/rust-random/getrandom/pull/675 [#&#8203;678]: https://github.com/rust-random/getrandom/pull/678 [#&#8203;688]: https://github.com/rust-random/getrandom/pull/688 [#&#8203;694]: https://github.com/rust-random/getrandom/pull/694 [#&#8203;699]: https://github.com/rust-random/getrandom/pull/699 [#&#8203;721]: https://github.com/rust-random/getrandom/pull/721 [#&#8203;724]: https://github.com/rust-random/getrandom/pull/724 [#&#8203;730]: https://github.com/rust-random/getrandom/pull/730 ### [`v0.3.3`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#033---2025-05-09) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.3.2...v0.3.3) ##### Changed - Doc improvements [#&#8203;632] [#&#8203;634] [#&#8203;635] - Add crate version to docs.rs links used in `compile_error!`s [#&#8203;639] ##### Fixed - Error handling in WASI p1 [#&#8203;661] [0.3.3]: https://github.com/rust-random/getrandom/compare/v0.3.2...v0.3.3 [#&#8203;632]: https://github.com/rust-random/getrandom/pull/632 [#&#8203;634]: https://github.com/rust-random/getrandom/pull/634 [#&#8203;635]: https://github.com/rust-random/getrandom/pull/635 [#&#8203;639]: https://github.com/rust-random/getrandom/pull/639 [#&#8203;661]: https://github.com/rust-random/getrandom/pull/661 ### [`v0.3.2`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#032---2025-03-17) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.3.1...v0.3.2) ##### Added - `efi_rng` opt-in backend [#&#8203;570] - `linux_raw` opt-in backend [#&#8203;572] - `.cargo/config.toml` example in the crate-level docs [#&#8203;591] - `getrandom_test_linux_without_fallback` configuration flag to test that file fallback is not triggered in the `linux_android_with_fallback` backend [#&#8203;605] - Built-in support for `*-linux-none` targets [#&#8203;618] - Cygwin support [#&#8203;626] ##### Changed - Update `wasi` dependency to v0.14 [#&#8203;594] - Add `#[inline]` attribute to the inner functions [#&#8203;596] - Update WASI and Emscripten links in the crate-level docs [#&#8203;597] - Do not use `dlsym` on MUSL targets in the `linux_android_with_fallback` backend [#&#8203;602] - Remove `linux_android.rs` and use `getrandom.rs` instead [#&#8203;603] - Always use `RtlGenRandom` on Windows targets when compiling with pre-1.78 Rust [#&#8203;610] - Internal representation of the `Error` type [#&#8203;614] - Remove `windows-targets` dependency and use [`raw-dylib`] directly [#&#8203;627] ##### Removed - `Error::INTERNAL_START` and `Error::CUSTOM_START` associated constants [#&#8203;614] [0.3.2]: https://github.com/rust-random/getrandom/compare/v0.3.1...v0.3.2 [#&#8203;570]: https://github.com/rust-random/getrandom/pull/570 [#&#8203;572]: https://github.com/rust-random/getrandom/pull/572 [#&#8203;591]: https://github.com/rust-random/getrandom/pull/591 [#&#8203;594]: https://github.com/rust-random/getrandom/pull/594 [#&#8203;596]: https://github.com/rust-random/getrandom/pull/596 [#&#8203;597]: https://github.com/rust-random/getrandom/pull/597 [#&#8203;602]: https://github.com/rust-random/getrandom/pull/602 [#&#8203;603]: https://github.com/rust-random/getrandom/pull/603 [#&#8203;605]: https://github.com/rust-random/getrandom/pull/605 [#&#8203;610]: https://github.com/rust-random/getrandom/pull/610 [#&#8203;614]: https://github.com/rust-random/getrandom/pull/614 [#&#8203;618]: https://github.com/rust-random/getrandom/pull/618 [#&#8203;626]: https://github.com/rust-random/getrandom/pull/626 [#&#8203;627]: https://github.com/rust-random/getrandom/pull/627 [`raw-dylib`]: https://doc.rust-lang.org/reference/items/external-blocks.html?highlight=link#dylib-versus-raw-dylib ### [`v0.3.1`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#031---2025-01-28) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.3.0...v0.3.1) ##### Fixed - Build error on Android [#&#8203;588] [0.3.1]: https://github.com/rust-random/getrandom/compare/v0.3.0...v0.3.1 [#&#8203;588]: https://github.com/rust-random/getrandom/pull/588 ### [`v0.3.0`](https://github.com/rust-random/getrandom/blob/HEAD/CHANGELOG.md#030---2025-01-25) [Compare Source](https://github.com/rust-random/getrandom/compare/v0.2.17...v0.3.0) ##### Breaking Changes ##### Changed - Bump MSRV to 1.63 [#&#8203;542] - Rename `getrandom` and `getrandom_uninit` functions to `fill` and `fill_uninit` respectively [#&#8203;532] ##### Removed - `wasm32-wasi` target support (use `wasm32-wasip1` or `wasm32-wasip2` instead) [#&#8203;499] - `linux_disable_fallback`, `rdrand`, `js`, `test-in-browser`, and `custom` crate features in favor of configuration flags [#&#8203;504] - `register_custom_getrandom!` macro [#&#8203;504] - Implementation of `From<NonZeroU32>` for `Error` and `Error::code` method [#&#8203;507] - Internet Explorer 11 support [#&#8203;554] - Target-specific associated `Error` constants [#&#8203;562] ##### Changed - Use `ProcessPrng` on Windows 10 and up, and use `RtlGenRandom` on older Windows versions [#&#8203;415] - Do not use locale-specific `strerror_r` for retrieving error code descriptions [#&#8203;440] - Avoid assuming `usize` is the native word size in the `rdrand` backend [#&#8203;442] - Do not read from `errno` when `libc` did not indicate error on Solaris [#&#8203;448] - Switch from `libpthread`'s mutex to `futex` on Linux and to `nanosleep`-based wait loop on other targets in the `use_file` backend [#&#8203;490] - Do not retry on `EAGAIN` while polling `/dev/random` on Linux [#&#8203;522] - Remove separate codepath for Node.js in the `wasm_js` backend (bumps minimum supported Node.js version to v19) [#&#8203;557] - Use `js_namespace` in the `wasm_js` backend [#&#8203;559] ##### Added - `wasm32-wasip1` and `wasm32-wasip2` support [#&#8203;499] - `getrandom_backend` configuration flag for selection of opt-in backends [#&#8203;504] - `Error::new_custom` method [#&#8203;507] - `rndr` opt-in backend [#&#8203;512] - Automatic MemorySanitizer support [#&#8203;521] [#&#8203;571] - `u32` and `u64` functions for generating random values of the respective type [#&#8203;544] - `wasm32v1-none` support in the `wasm_js` backend [#&#8203;560] - `wasm_js` crate feature which allows users to enable the `wasm_js` opt-in backend [#&#8203;574] ##### Fixed - NetBSD fallback code based on `KERN_ARND` [#&#8203;555] [0.3.0]: https://github.com/rust-random/getrandom/compare/v0.2.15...v0.3.0 [#&#8203;415]: https://github.com/rust-random/getrandom/pull/415 [#&#8203;440]: https://github.com/rust-random/getrandom/pull/440 [#&#8203;442]: https://github.com/rust-random/getrandom/pull/442 [#&#8203;448]: https://github.com/rust-random/getrandom/pull/448 [#&#8203;490]: https://github.com/rust-random/getrandom/pull/490 [#&#8203;499]: https://github.com/rust-random/getrandom/pull/499 [#&#8203;504]: https://github.com/rust-random/getrandom/pull/504 [#&#8203;507]: https://github.com/rust-random/getrandom/pull/507 [#&#8203;512]: https://github.com/rust-random/getrandom/pull/512 [#&#8203;521]: https://github.com/rust-random/getrandom/pull/521 [#&#8203;522]: https://github.com/rust-random/getrandom/pull/522 [#&#8203;532]: https://github.com/rust-random/getrandom/pull/532 [#&#8203;542]: https://github.com/rust-random/getrandom/pull/542 [#&#8203;544]: https://github.com/rust-random/getrandom/pull/544 [#&#8203;554]: https://github.com/rust-random/getrandom/pull/554 [#&#8203;555]: https://github.com/rust-random/getrandom/pull/555 [#&#8203;557]: https://github.com/rust-random/getrandom/pull/557 [#&#8203;559]: https://github.com/rust-random/getrandom/pull/559 [#&#8203;560]: https://github.com/rust-random/getrandom/pull/560 [#&#8203;562]: https://github.com/rust-random/getrandom/pull/562 [#&#8203;571]: https://github.com/rust-random/getrandom/pull/571 [#&#8203;574]: https://github.com/rust-random/getrandom/pull/574 </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 08:00 AM and 09:59 AM, only on Monday and Thursday (`* 8-9 * * 1,4`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xODYuMSIsInVwZGF0ZWRJblZlciI6IjQzLjE4Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSIsInJ1c3QiXX0=-->
Update Rust crate getrandom to 0.4
Some checks failed
CI / ci (pull_request) Failing after 33s
31e2fc4031
fix regression
All checks were successful
CI / ci (pull_request) Successful in 4m20s
3f2c6d5338
navicore deleted branch renovate/getrandom-0.x 2026-05-28 13:47:27 +00:00
Sign in to join this conversation.
No description provided.