Skip to content

Commit

Permalink
Release v0.2.13 (#405)
Browse files Browse the repository at this point in the history
* Release v0.2.13

* Tweak web tests

* Apply `continue-on-error: true` for the whole Web Windows job

* Update release date

* Test Edge only on Windows

* Fix path in `.cargo/config` symlink

* Update wasmpack to v0.12.1
  • Loading branch information
newpavlov authored Apr 6, 2024
1 parent 8ffd43e commit 968dd48
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
9 changes: 0 additions & 9 deletions .cargo/config

This file was deleted.

1 change: 1 addition & 0 deletions .cargo/config
9 changes: 9 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Allow normal use of "cargo run" and "cargo test" on these wasm32 platforms.
[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'
[target.wasm32-wasi]
runner = 'wasmtime'

# Just run on node by default (that's where emscripten is tested)
[target.'cfg(target_os = "emscripten")']
runner = 'node'
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ jobs:
host: x86_64-unknown-linux-musl
- os: windows-2022
host: x86_64-pc-windows-msvc
# We get spurious failures on Windows, see:
# https://github.com/rust-random/getrandom/issues/400
continue-on-error: true
- os: macos-12
host: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
Expand All @@ -240,7 +243,7 @@ jobs:
- name: Install precompiled wasm-pack
shell: bash
run: |
VERSION=v0.11.0
VERSION=v0.12.1
URL=https://github.com/rustwasm/wasm-pack/releases/download/${VERSION}/wasm-pack-${VERSION}-${{ matrix.host }}.tar.gz
wget -O - $URL | tar -xz --strip-components=1 -C ~/.cargo/bin
wasm-pack --version
Expand All @@ -253,13 +256,9 @@ jobs:
run: wasm-pack test --headless --chrome --features=js,test-in-browser
- name: Test (Edge)
if: runner.os == 'Windows'
# Edge has flaky failures: "driver failed to bind port during startup"
continue-on-error: true
run: wasm-pack test --headless --chrome --chromedriver $Env:EDGEWEBDRIVER\msedgedriver.exe --features=js,test-in-browser
- name: Test (Safari)
if: runner.os == 'macOS'
# Safari tests are broken: https://github.com/rustwasm/wasm-bindgen/issues/3004
continue-on-error: true
run: wasm-pack test --headless --safari --features=js,test-in-browser
- name: Test (custom getrandom)
run: wasm-pack test --node --features=custom
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [0.2.13] - 2024-04-06
### Added
- `linux_disable_fallback` crate feature to disable `/dev/urandom`-based fallback on Linux and
Android targets. Enabling this feature bumps minimum supported Linux kernel version to 4.17 and
Android targets. Enabling this feature bumps minimum supported Linux kernel version to 3.17 and
Android API level to 23 (Marshmallow). [#396]

### Changed
Expand Down Expand Up @@ -433,6 +433,7 @@ Publish initial implementation.
## [0.0.0] - 2019-01-19
Publish an empty template library.

[0.2.13]: https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.13
[0.2.12]: https://github.com/rust-random/getrandom/compare/v0.2.11...v0.2.12
[0.2.11]: https://github.com/rust-random/getrandom/compare/v0.2.10...v0.2.11
[0.2.10]: https://github.com/rust-random/getrandom/compare/v0.2.9...v0.2.10
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "getrandom"
version = "0.2.12" # Also update html_root_url in lib.rs when bumping this
version = "0.2.13" # Also update html_root_url in lib.rs when bumping this
edition = "2018"
authors = ["The Rand Project Developers"]
license = "MIT OR Apache-2.0"
Expand Down
17 changes: 16 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@
//! This prevents a crate from overriding a secure source of randomness
//! (either accidentally or intentionally).
//!
//! ## `/dev/urandom` fallback on Linux and Android
//!
//! On Linux targets the fallback is present only for the following `target_arch`es:
//! `aarch64`, `arm`, `powerpc`, `powerpc64`, `s390x`, `x86`, `x86_64`. Other supported
//! `target_arch`es [require](https://doc.rust-lang.org/stable/rustc/platform-support.html)
//! kernel versions which support `getrandom` system call, so fallback is not needed.
//!
//! On Android targets the fallback is present only for the following `target_arch`es:
//! `aarch64`, `arm`, `x86`, `x86_64`. Other `target_arch`es (e.g. RISC-V) require
//! sufficiently high API levels.
//!
//! The fallback can be disabled by enabling the `linux_disable_fallback` crate feature.
//! Note that doing so will bump minimum supported Linux kernel version to 3.17 and
//! Android API level to 23 (Marshmallow).
//!
//! ### RDRAND on x86
//!
//! *If the `rdrand` Cargo feature is enabled*, `getrandom` will fallback to using
Expand Down Expand Up @@ -189,7 +204,7 @@
#![doc(
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://docs.rs/getrandom/0.2.12"
html_root_url = "https://docs.rs/getrandom/0.2.13"
)]
#![no_std]
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]
Expand Down

0 comments on commit 968dd48

Please sign in to comment.