Skip to content

Commit 9f05e22

Browse files
authored
Update: getrandom v0.3.0 rc.0 (#1541)
1 parent 88c310b commit 9f05e22

File tree

16 files changed

+43
-70
lines changed

16 files changed

+43
-70
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
run: |
122122
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
123123
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features
124-
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc,os_rng
124+
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features --features=os_rng
125125
- name: Test rand_distr
126126
run: |
127127
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --features=serde

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
88

99
You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.
1010

11+
## [0.9.0-beta.1] - 2024-11-30
12+
- Bump `rand_core` version
13+
1114
## [0.9.0-beta.0] - 2024-11-25
1215
This is a pre-release. To depend on this version, use `rand = "=0.9.0-beta.0"` to prevent automatic updates (which can be expected to include breaking changes).
1316

@@ -65,6 +68,7 @@ This is a pre-release. To depend on this version, use `rand = "=0.9.0-beta.0"` t
6568
- Distribution `Uniform` implements `TryFrom` instead of `From` for ranges (#1229)
6669
- Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287)
6770
- Add `UniformUsize` and use to make `Uniform` for `usize` portable (#1487)
71+
- Remove support for generating `isize` and `usize` values with `Standard`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight (#1487)
6872
- Optimize fn `sample_single_inclusive` for floats (+~20% perf) (#1289)
6973
- Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` (#1462)
7074
- Add impl `DistString` for distributions `Slice<char>` and `Uniform<char>` (#1315)

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand"
3-
version = "0.9.0-beta.0"
3+
version = "0.9.0-beta.1"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -37,7 +37,7 @@ serde = ["dep:serde", "rand_core/serde"]
3737
std = ["rand_core/std", "rand_chacha?/std", "alloc"]
3838

3939
# Option: "alloc" enables support for Vec and Box when not using "std"
40-
alloc = ["rand_core/alloc"]
40+
alloc = []
4141

4242
# Option: enable OsRng
4343
os_rng = ["rand_core/os_rng"]
@@ -69,14 +69,14 @@ members = [
6969
exclude = ["benches", "distr_test"]
7070

7171
[dependencies]
72-
rand_core = { path = "rand_core", version = "=0.9.0-beta.0", default-features = false }
72+
rand_core = { path = "rand_core", version = "=0.9.0-beta.1", default-features = false }
7373
log = { version = "0.4.4", optional = true }
7474
serde = { version = "1.0.103", features = ["derive"], optional = true }
75-
rand_chacha = { path = "rand_chacha", version = "=0.9.0-beta.0", default-features = false, optional = true }
75+
rand_chacha = { path = "rand_chacha", version = "=0.9.0-beta.1", default-features = false, optional = true }
7676
zerocopy = { version = "0.8.0", default-features = false, features = ["simd"] }
7777

7878
[dev-dependencies]
79-
rand_pcg = { path = "rand_pcg", version = "=0.9.0-beta.0" }
79+
rand_pcg = { path = "rand_pcg", version = "=0.9.0-beta.1" }
8080
# Only to test serde
8181
bincode = "1.2.1"
8282
rayon = "1.7"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rand = "0.8.5"
6464
Or, to try the 0.9.0 beta release:
6565
```toml
6666
[dependencies]
67-
rand = "=0.9.0-beta.0"
67+
rand = "=0.9.0-beta.1"
6868
```
6969

7070
To get started using Rand, see [The Book](https://rust-random.github.io/book).

distr_test/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ edition = "2021"
55
publish = false
66

77
[dev-dependencies]
8-
rand_distr = { path = "../rand_distr", version = "=0.5.0-beta.1", default-features = false, features = ["alloc"] }
9-
rand = { path = "..", version = "=0.9.0-beta.0", features = ["small_rng"] }
8+
rand_distr = { path = "../rand_distr", version = "=0.5.0-beta.2", default-features = false, features = ["alloc"] }
9+
rand = { path = "..", version = "=0.9.0-beta.1", features = ["small_rng"] }
1010
num-traits = "0.2.19"
1111
# Special functions for testing distributions
1212
special = "0.11.0"

rand_chacha/CHANGELOG.md

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

7+
## [0.9.0-beta.1] - 2024-11-30
8+
- Bump `rand_core` version
9+
710
## [0.9.0-beta.0] - 2024-11-25
811
This is a pre-release. To depend on this version, use `rand_chacha = "=0.9.0-beta.0"` to prevent automatic updates (which can be expected to include breaking changes).
912

rand_chacha/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_chacha"
3-
version = "0.9.0-beta.0"
3+
version = "0.9.0-beta.1"
44
authors = ["The Rand Project Developers", "The Rust Project Developers", "The CryptoCorrosion Contributors"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -20,14 +20,14 @@ all-features = true
2020
rustdoc-args = ["--generate-link-to-definition"]
2121

2222
[dependencies]
23-
rand_core = { path = "../rand_core", version = "=0.9.0-beta.0" }
23+
rand_core = { path = "../rand_core", version = "=0.9.0-beta.1" }
2424
ppv-lite86 = { version = "0.2.14", default-features = false, features = ["simd"] }
2525
serde = { version = "1.0", features = ["derive"], optional = true }
2626

2727
[dev-dependencies]
2828
# Only to test serde
2929
serde_json = "1.0"
30-
rand_core = { path = "../rand_core", version = "=0.9.0-beta.0", features = ["os_rng"] }
30+
rand_core = { path = "../rand_core", version = "=0.9.0-beta.1", features = ["os_rng"] }
3131

3232
[features]
3333
default = ["std"]

rand_core/CHANGELOG.md

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

7+
## [0.9.0-beta.1] - 2024-11-30
8+
- Update to `getrandom` v0.3.0-rc.0
9+
710
## [0.9.0-beta.0] - 2024-11-25
811
This is a pre-release. To depend on this version, use `rand_core = "=0.9.0-beta.0"` to prevent automatic updates (which can be expected to include breaking changes).
912

rand_core/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_core"
3-
version = "0.9.0-beta.0"
3+
version = "0.9.0-beta.1"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -25,12 +25,11 @@ rustdoc-args = ["--generate-link-to-definition"]
2525
all-features = true
2626

2727
[features]
28-
std = ["alloc", "getrandom?/std"]
29-
alloc = [] # enables Vec and Box support without std
28+
std = ["getrandom?/std"]
3029
os_rng = ["dep:getrandom"]
3130
serde = ["dep:serde"] # enables serde for BlockRng wrapper
3231

3332
[dependencies]
3433
serde = { version = "1", features = ["derive"], optional = true }
35-
getrandom = { version = "0.2", optional = true }
34+
getrandom = { version = "0.3.0-rc.0", optional = true }
3635
zerocopy = { version = "0.8.0", default-features = false }

rand_core/README.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,9 @@ The traits and error types are also available via `rand`.
4242

4343
The current version is:
4444
```
45-
rand_core = "0.6.4"
45+
rand_core = "=0.9.0-beta.1"
4646
```
4747

48-
Rand libs have inter-dependencies and make use of the
49-
[semver trick](https://github.com/dtolnay/semver-trick/) in order to make traits
50-
compatible across crate versions. (This is especially important for `RngCore`
51-
and `SeedableRng`.) A few crate releases are thus compatibility shims,
52-
depending on the *next* lib version (e.g. `rand_core` versions `0.2.2` and
53-
`0.3.1`). This means, for example, that `rand_core_0_4_0::SeedableRng` and
54-
`rand_core_0_3_0::SeedableRng` are distinct, incompatible traits, which can
55-
cause build errors. Usually, running `cargo update` is enough to fix any issues.
56-
57-
## Crate Features
58-
59-
`rand_core` supports `no_std` and `alloc`-only configurations, as well as full
60-
`std` functionality. The differences between `no_std` and full `std` are small,
61-
comprising `RngCore` support for `Box<R>` types where `R: RngCore`,
62-
`std::io::Read` support for types supporting `RngCore`, and
63-
extensions to the `Error` type's functionality.
64-
65-
The `std` feature is *not enabled by default*. This is primarily to avoid build
66-
problems where one crate implicitly requires `rand_core` with `std` support and
67-
another crate requires `rand` *without* `std` support. However, the `rand` crate
68-
continues to enable `std` support by default, both for itself and `rand_core`.
69-
70-
The `serde` feature can be used to derive `Serialize` and `Deserialize` for RNG
71-
implementations that use the `BlockRng` or `BlockRng64` wrappers.
72-
7348

7449
# License
7550

0 commit comments

Comments
 (0)