Skip to content

Commit 5577003

Browse files
authored
Update CHANGELOGs and prepare rand 0.9.0-alpha.0 (#1395)
Also: add pull-request template
1 parent 8aa456c commit 5577003

File tree

11 files changed

+85
-26
lines changed

11 files changed

+85
-26
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- [ ] Added a `CHANGELOG.md` entry
2+
3+
# Summary
4+
5+
# Motivation
6+
7+
# Details

CHANGELOG.md

+32-4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,44 @@ 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] - unreleased
11+
## [0.9.0-alpha.0] - 2024-02-18
12+
This is a pre-release. To depend on this version, use `rand = "=0.9.0-alpha.0"` to prevent automatic updates (which can be expected to include breaking changes).
13+
14+
### Generators
15+
- Change `SmallRng::seed_from_u64` implementation (#1203)
16+
- Replace `SeedableRng` impl for `SmallRng` with inherent methods, excluding `fn from_seed` (#1368)
17+
18+
### Sequences
19+
- Simpler and faster implementation of Floyd's F2 (#1277). This
20+
changes some outputs from `rand::seq::index::sample` and
21+
`rand::seq::SliceRandom::choose_multiple`.
22+
- New, faster algorithms for `IteratorRandom::choose` and `choose_stable` (#1268)
23+
- New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` (#1272)
24+
- Re-introduce `Rng::gen_iter` (#1305)
25+
- Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` (#1382)
26+
1227
### Distributions
1328
- `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) (#1229)
1429
- `Uniform` implements `TryFrom` instead of `From` for ranges (#1229)
1530
- `Uniform` now uses Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287)
31+
- Relax `Sized` bound on `Distribution<T> for &D` (#1278)
32+
- Explicit impl of `sample_single_inclusive` (+~20% perf) (#1289)
33+
- Impl `DistString` for `Slice<char>` and `Uniform<char>` (#1315)
34+
- Let `Standard` support all `NonZero*` types (#1332)
35+
- Add `trait Weight`, allowing `WeightedIndex` to trap overflow (#1353)
36+
- Rename `WeightedError` to `WeightError`, revising variants (#1382)
37+
38+
### SIMD
39+
- Switch to `std::simd`, expand SIMD & docs (#1239)
40+
- Optimise SIMD widening multipy (#1247)
1641

1742
### Other
18-
- Simpler and faster implementation of Floyd's F2 (#1277). This
19-
changes some outputs from `rand::seq::index::sample` and
20-
`rand::seq::SliceRandom::choose_multiple`.
43+
- Bump MSRV to 1.60.0 (#1207, #1246, #1269, #1341)
44+
- Improve `thread_rng` related docs (#1257)
45+
- Add `Cargo.lock.msrv` file (#1275)
46+
- Docs: enable experimental `--generate-link-to-definition` feature (#1327)
47+
- Use `zerocopy` to replace some `unsafe` code (#1349)
48+
- Support `std` feature without `getrandom` or `rand_chacha` (#1354)
2149

2250
## [0.8.5] - 2021-08-20
2351
### Fixes

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand"
3-
version = "0.9.0"
3+
version = "0.9.0-alpha.0"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -65,18 +65,18 @@ members = [
6565
]
6666

6767
[dependencies]
68-
rand_core = { path = "rand_core", version = "0.7.0", default-features = false }
68+
rand_core = { path = "rand_core", version = "=0.9.0-alpha.0", default-features = false }
6969
log = { version = "0.4.4", optional = true }
7070
serde = { version = "1.0.103", features = ["derive"], optional = true }
71-
rand_chacha = { path = "rand_chacha", version = "0.4.0", default-features = false, optional = true }
71+
rand_chacha = { path = "rand_chacha", version = "=0.9.0-alpha.0", default-features = false, optional = true }
7272
zerocopy = { version = "=0.8.0-alpha.5", default-features = false, features = ["simd"] }
7373

7474
[target.'cfg(unix)'.dependencies]
7575
# Used for fork protection (reseeding.rs)
7676
libc = { version = "0.2.22", optional = true, default-features = false }
7777

7878
[dev-dependencies]
79-
rand_pcg = { path = "rand_pcg", version = "0.4.0" }
79+
rand_pcg = { path = "rand_pcg", version = "=0.9.0-alpha.0" }
8080
# Only to test serde1
8181
bincode = "1.2.1"
8282
rayon = "1.5.3"

rand_chacha/CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ 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-
## [Unreleased]
8-
- Made `rand_chacha` propagate the `std` feature down to `rand_core`
9-
- Performance improvements for AVX2: ~4-7%
7+
## [0.9.0-alpha.0] - 2024-02-18
8+
This is a pre-release. To depend on this version, use `rand_chacha = "=0.9.0-alpha.0"` to prevent automatic updates (which can be expected to include breaking changes).
9+
10+
- Made `rand_chacha` propagate the `std` feature down to `rand_core` (#1153)
11+
- Remove usage of `unsafe` in `fn generate` (#1181) then optimise for AVX2 (~4-7%) (#1192)
1012

1113
## [0.3.1] - 2021-06-09
1214
- add getters corresponding to existing setters: `get_seed`, `get_stream` (#1124)

rand_chacha/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_chacha"
3-
version = "0.4.0"
3+
version = "0.9.0-alpha.0"
44
authors = ["The Rand Project Developers", "The Rust Project Developers", "The CryptoCorrosion Contributors"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -19,7 +19,7 @@ rust-version = "1.60"
1919
rustdoc-args = ["--generate-link-to-definition"]
2020

2121
[dependencies]
22-
rand_core = { path = "../rand_core", version = "0.7.0" }
22+
rand_core = { path = "../rand_core", version = "=0.9.0-alpha.0" }
2323
ppv-lite86 = { version = "0.2.14", default-features = false, features = ["simd"] }
2424
serde = { version = "1.0", features = ["derive"], optional = true }
2525

rand_core/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ 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-alpha.0] - 2024-02-18
8+
This is a pre-release. To depend on this version, use `rand_core = "=0.9.0-alpha.0"` to prevent automatic updates (which can be expected to include breaking changes).
9+
10+
- Bump MSRV to 1.60.0 (#1207, #1246, #1269, #1341)
11+
- Allow `rand_core::impls::fill_via_u*_chunks` to mutate source (#1182)
12+
- Add `fn RngCore::read_adapter` implementing `std::io::Read` (#1267)
13+
- Add `trait CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` (#1273)
14+
- Use `zerocopy` to replace some `unsafe` code (#1349, #1393)
15+
716
## [0.6.4] - 2022-09-15
817
- Fix unsoundness in `<BlockRng64 as RngCore>::next_u32` (#1160)
918
- Reduce use of `unsafe` and improve gen_bytes performance (#1180)

rand_core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_core"
3-
version = "0.7.0"
3+
version = "0.9.0-alpha.0"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"

rand_distr/CHANGELOG.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ 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.5.0] - unreleased
7+
## [0.5.0-alpha.0] - 2024-02-18
8+
This is a pre-release. To depend on this version, use `rand_distr = "=0.5.0-alpha.0"` to prevent automatic updates (which can be expected to include breaking changes).
9+
10+
### Additions
11+
- Make distributions comparable with `PartialEq` (#1218)
12+
- Add `WeightedIndexTree` (#1372)
13+
14+
### Changes
15+
- Target `rand` version `0.9.0-alpha.0`
816
- Remove unused fields from `Gamma`, `NormalInverseGaussian` and `Zipf` distributions (#1184)
917
This breaks serialization compatibility with older versions.
10-
- Upgrade Rand
11-
- Fix Knuth's method so `Poisson` doesn't return -1.0 for small lambda
12-
- Fix `Poisson` distribution instantiation so it return an error if lambda is infinite
1318
- `Dirichlet` now uses `const` generics, which means that its size is required at compile time (#1292)
1419
- The `Dirichlet::new_with_size` constructor was removed (#1292)
1520

21+
### Fixes
22+
- Fix Knuth's method so `Poisson` doesn't return -1.0 for small lambda (#1284)
23+
- Fix `Poisson` distribution instantiation so it return an error if lambda is infinite (#1291)
24+
- Fix Dirichlet sample for small alpha values to avoid NaN samples (#1209)
25+
- Fix infinite loop in `Binomial` distribution (#1325)
26+
1627
## [0.4.3] - 2021-12-30
1728
- Fix `no_std` build (#1208)
1829

rand_distr/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_distr"
3-
version = "0.5.0"
3+
version = "0.5.0-alpha.0"
44
authors = ["The Rand Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -27,15 +27,15 @@ std_math = ["num-traits/std"]
2727
serde1 = ["serde", "rand/serde1"]
2828

2929
[dependencies]
30-
rand = { path = "..", version = "0.9.0", default-features = false }
30+
rand = { path = "..", version = "=0.9.0-alpha.0", default-features = false }
3131
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
3232
serde = { version = "1.0.103", features = ["derive"], optional = true }
3333
serde_with = { version = "3.6.1", optional = true }
3434

3535
[dev-dependencies]
36-
rand_pcg = { version = "0.4.0", path = "../rand_pcg" }
36+
rand_pcg = { version = "=0.9.0-alpha.0", path = "../rand_pcg" }
3737
# For inline examples
38-
rand = { path = "..", version = "0.9.0", features = ["small_rng"] }
38+
rand = { path = "..", version = "=0.9.0-alpha.0", features = ["small_rng"] }
3939
# Histogram implementation for testing uniformity
4040
average = { version = "0.13", features = [ "std" ] }
4141
# Special functions for testing distributions

rand_pcg/CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +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-
## [Unreleased]
7+
## [0.9.0-alpha.0] - 2024-02-18
8+
This is a pre-release. To depend on this version, use `rand_pcg = "=0.9.0-alpha.0"` to prevent automatic updates (which can be expected to include breaking changes).
9+
810
- Add `Lcg128CmDxsm64` generator compatible with NumPy's `PCG64DXSM` (#1202)
911
- Add examples for initializing the RNGs
1012

rand_pcg/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_pcg"
3-
version = "0.4.0"
3+
version = "0.9.0-alpha.0"
44
authors = ["The Rand Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -22,11 +22,11 @@ rustdoc-args = ["--generate-link-to-definition"]
2222
serde1 = ["serde"]
2323

2424
[dependencies]
25-
rand_core = { path = "../rand_core", version = "0.7.0" }
25+
rand_core = { path = "../rand_core", version = "=0.9.0-alpha.0" }
2626
serde = { version = "1", features = ["derive"], optional = true }
2727

2828
[dev-dependencies]
29-
rand = { path = "..", version = "0.9" }
29+
rand = { path = "..", version = "=0.9.0-alpha.0" }
3030
# This is for testing serde, unfortunately we can't specify feature-gated dev
3131
# deps yet, see: https://github.com/rust-lang/cargo/issues/1596
3232
# Versions prior to 1.1.4 had incorrect minimal dependencies.

0 commit comments

Comments
 (0)