Skip to content

Commit 2bc251c

Browse files
authored
Allow use of wasip3 0.3 for MSRV reasons (#824)
This allows a project dependeing on `getrandom` to use this to get an Fully Rust-1.85-compatible Cargo.lock, while still allowing projects with newer MSRV to use 0.4.
1 parent f5a1cdf commit 2bc251c

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
- Restore MSRV to 1.85 for wasm32-wasip3 targets. [#824]
10+
11+
[Unreleased]: https://github.com/rust-random/getrandom/compare/v0.4.2...master
12+
[#824]: https://github.com/rust-random/getrandom/pull/824
13+
714
## [0.4.2] - 2026-03-03
815

916
### Changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ wasip2 = { version = "1", default-features = false }
8282

8383
# wasi_p2_3
8484
[target.'cfg(all(target_arch = "wasm32", target_os = "wasi", target_env = "p3"))'.dependencies]
85-
wasip3 = "0.4"
85+
# TODO: remove 0.3 after MSRV bumped to 1.87+.
86+
wasip3 = ">=0.3, <=0.4"
8687

8788
# wasm_js
8889
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))'.dependencies]

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,13 @@ RUSTFLAGS="-Zsanitizer=memory" cargo test -Zbuild-std --target=x86_64-unknown-li
326326

327327
This crate requires Rust 1.85 or later.
328328

329+
The most reliable way to get an MSRV-respecting behavior is to set
330+
`CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback` when doing
331+
`cargo update -p getrandom`, like so:
332+
```sh
333+
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo update -p getrandom
334+
```
335+
329336
## License
330337

331338
The `getrandom` library is distributed under either of

0 commit comments

Comments
 (0)