Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,19 @@ jobs:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="unsupported"
run: cargo build --target riscv32i-unknown-none-elf

unsupported:
name: Runtime error
wasm_override:
name: Web WASM override (${{ matrix.backend }})
runs-on: ubuntu-24.04
strategy:
matrix:
backend: [unsupported, custom]
env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="${{ matrix.backend }}"
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="unsupported"
run: cargo build --target wasm32-unknown-unknown
- run: cargo build --target wasm32-unknown-unknown
- run: cargo build --target wasm32-unknown-unknown --features wasm_js
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Deprecation warning for `libc::INT_MAX` [#868]
- Compilation error on WASM targets when `wasm_js` crate feature and
`getrandom_backend` configuration flag are used simultaneously ([#875])

### Changed
- Bumped `r-efi` dependency to v7 ([#869])
Expand All @@ -22,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#869]: https://github.com/rust-random/getrandom/pull/869
[#870]: https://github.com/rust-random/getrandom/pull/870
[#871]: https://github.com/rust-random/getrandom/pull/871
[#875]: https://github.com/rust-random/getrandom/pull/875

## [0.4.3] - 2026-06-17
### Added
Expand Down
5 changes: 5 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ impl Error {
Error::WINDOWS_RTL_GEN_RANDOM => "RtlGenRandom: Windows system function failure",
#[cfg(all(
feature = "wasm_js",
not(any(
getrandom_backend = "unsupported",
getrandom_backend = "custom",
getrandom_backend = "extern_impl",
)),
target_arch = "wasm32",
any(target_os = "unknown", target_os = "none")
))]
Expand Down
Loading