From ab5e03e5d736b4bbb26ccf9a69b682c2144d1417 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Thu, 22 Mar 2018 10:34:45 +0100 Subject: [PATCH 1/3] Update changelog --- CHANGELOG.md | 103 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eab4a92ca7d..e88303c4d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,16 +4,99 @@ 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). -## [0.4.2] - 2018-01-05 + +## [0.5.0] - Unreleased + +### Crate features and organisation +- Minimum Rust version update: 1.22.0. (#239) +- Created a seperate `rand-core` crate. (#288) +- deprecated `rand_derive`. (#256) +- Added `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) +- Added `serde-1` feature for some PRNGs. (#189) + +### `Rng` trait +- Split `Rng` in `RngCore` and `Rng` extension trait. + `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265) +- Added `Rng::sample`. (#256) +- Deprecated `Rng::gen_weighted_bool`. (#308) +- Added `Rng::gen_bool`. (#308) +- Removed `Rng::next_f32` and `Rng::next_f64`. (#273) +- Added optimized `Rng::fill` and `Rng::try_fill` methods. (#247) +- Deprecated `Rng::gen_iter`. (#286) +- Deprecated `Rng::gen_ascii_chars`. (#279) + +### `rand-core` crate +(changes included here because they greatly influence the Rand crate) +- `RngCore` and `SeedableRng` are now part of `rand-core`. (#288) +- Added modules to help implementing RNGs `impl` and `le`. (#209, #228) +- added `Error` and `ErrorKind`. (#225) +- Added `CryptoRng` marker trait. (#273) +- Added `BlockRngCore` trait. (#281) +- Added `BlockRng` wrapper to help implemtations. (#281) +- Revised the `SeedableRng` trait. (#233) +- Removed default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) +- Added `RngCore::try_fill_bytes`. (#225) + +### Other traits and types +- Added `NewRng` trait. (#233) +- Added `SmallRng` wrapper. (#296) +- Rewritten `ReseedingRng` to only work with `BlockRngCore` (much improved performance). (#281) +- Deprecated `weak_rng`. Use `SmallRng` instead. (#296) +- Deprecated `random`. (#296) +- Deprecated `AsciiGenerator`. (#279) + +### Random number generators +- Switched `StdRng` and `thread_rng` to HC-128. (#277) +- Changed `thread_rng` reseeding threshold to 32 MiB. (#277) +- PRNGs no longer implement `Copy`. (#209) +- `Debug` implementations no longer show internals. (#209) +- Implemented serialisation for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde-1` feature. (#189) +- Implemented `BlockRngCore` for `ChaCha` and `Hc128`. (#281) +- All PRNGs are now portable across big- and little-endian architectures. (#209) +- `Isaac64Rng::next_u32` no longer throws away half the results. (#209) +- Added `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) +- Added the HC-128 CSPRNG `Hc128Rng`. (#210) +- Added `ChaChaRng::set_rounds` method. (#243) +- Changes to `JitterRng` to get it's size down from 2112 to 24 bytes. (#251) +- Various performance improvements to all PRNGs. + +### Platform support and `OsRng` +- Added support for CloudABI. (#224) +- Removed support for NaCl. (#225) +- Replaced stubs with proper WASM support in `OsRng`. (#272) +- Keep open only a single file descriptor for `OsRng`, on systems that do not have a syscall interface. (#239) +- Better error handling and reporting in `OsRng` (using new error type). (#225) +- `OsRng` now uses non-blocking when available. (#225) +- Added `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) + +### Distributions +- New `Distribution` trait. (#256) +- Deprecated `Rand`, `Sample` and `IndependentSample` traits. (#256) +- Added a `Uniform` distribution (replaces most `Rand` implementations). (#256) +- Added `Binomial` and `Poisson` distributions. (#96) +- Added `Alphanumeric` distribution. (#279) +- Removed `Open01` and `Closed01` distributions, use `Uniform` instead (open distribution). (#274) +- Reworked `Range` type, making it possible to implement it for user types. (#274) +- Added `Range::new_inclusive` for inclusive ranges. (#274) +- Added `Range::sample_single` to allow for optimized implementations. (#274) +- Uses widening multiply method for much faster integer range reduction. (#274) +- `Uniform` distributions for `bool` uses `Range`. (#274) +- `Uniform` distributions for `bool` uses sign test. (#274) +- Added `HighPrecision01` distribution. (#320) + + +## [0.4.2] - 2018-01-06 ### Changed -- Use winapi on Windows +- Use `winapi` on Windows - Update for Fuchsia OS - Remove dev-dependency on `log` + ## [0.4.1] - 2017-12-17 ### Added - `no_std` support + ## [0.4.0-pre.0] - 2017-12-11 ### Added - `JitterRng` added as a high-quality alternative entropy source using the @@ -29,6 +112,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated - `sample` function deprecated (replaced by `sample_iter`) + +## [0.3.20] - 2018-01-06 +### Changed +- Remove dev-dependency on `log` +- Update `fuchsia-zircon` dependency to 0.3.2 + + +## [0.3.19] - 2017-12-27 +### Changed +- Require `log <= 0.3.8` for dev builds +- Update `fuchsia-zircon` dependency to 0.3 +- Fix broken links in docs (to unblock compiler docs testing CI) + + ## [0.3.18] - 2017-11-06 ### Changed - `thread_rng` is seeded from the system time if `OsRng` fails @@ -223,7 +320,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters ### Changed -- Now only depends on libcore! 2adf5363f88ffe06f6d2ea5c338d1b186d47f4a1 +- Now only depends on libcore! - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` - Rename OSRng to OsRng - The WeightedChoice structure is no longer built with a `Vec>`, From e8eee57aaa2400a647b6f19e2e85fd1741b6d76e Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Thu, 1 Feb 2018 19:10:12 +0100 Subject: [PATCH 2/3] Add changelog to rand-core --- rand-core/CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 rand-core/CHANGELOG.md diff --git a/rand-core/CHANGELOG.md b/rand-core/CHANGELOG.md new file mode 100644 index 00000000000..c4d49793c6c --- /dev/null +++ b/rand-core/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog +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). + + +## [0.1.0] - Unreleased + +### `rand-core` crate +(Split out of the Rand crate, changes here are relative to rand 0.4.2) +- `RngCore` and `SeedableRng` are now part of `rand-core`. (#288) +- Added modules to help implementing RNGs `impl` and `le`. (#209, #228) +- added `Error` and `ErrorKind`. (#225) +- Added `CryptoRng` marker trait. (#273) +- Added `BlockRngCore` trait. (#281) +- Added `BlockRng` wrapper to help implemtations. (#281) +- Revised the `SeedableRng` trait. (#233) +- Removed default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) +- Added `RngCore::try_fill_bytes`. (#225) + +## [0.0.1] - 2017-09-14 +Experimental version as part of the rand crate refactor. From 6127739550a0b8a9ce44908582100eb89c6f271b Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Thu, 22 Mar 2018 13:24:36 +0100 Subject: [PATCH 3/3] Change to imperative language, and address review comments --- CHANGELOG.md | 97 +++++++++++++++++++++--------------------- rand-core/CHANGELOG.md | 16 +++---- 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e88303c4d57..5a1de248c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,80 +9,81 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Crate features and organisation - Minimum Rust version update: 1.22.0. (#239) -- Created a seperate `rand-core` crate. (#288) -- deprecated `rand_derive`. (#256) -- Added `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) -- Added `serde-1` feature for some PRNGs. (#189) +- Create a seperate `rand-core` crate. (#288) +- Deprecate `rand_derive`. (#256) +- Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246) +- Add `serde-1` feature for some PRNGs. (#189) ### `Rng` trait - Split `Rng` in `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265) -- Added `Rng::sample`. (#256) -- Deprecated `Rng::gen_weighted_bool`. (#308) -- Added `Rng::gen_bool`. (#308) -- Removed `Rng::next_f32` and `Rng::next_f64`. (#273) -- Added optimized `Rng::fill` and `Rng::try_fill` methods. (#247) -- Deprecated `Rng::gen_iter`. (#286) -- Deprecated `Rng::gen_ascii_chars`. (#279) +- Add `Rng::sample`. (#256) +- Deprecate `Rng::gen_weighted_bool`. (#308) +- Add `Rng::gen_bool`. (#308) +- Remove `Rng::next_f32` and `Rng::next_f64`. (#273) +- Add optimized `Rng::fill` and `Rng::try_fill` methods. (#247) +- Deprecate `Rng::gen_iter`. (#286) +- Deprecate `Rng::gen_ascii_chars`. (#279) ### `rand-core` crate (changes included here because they greatly influence the Rand crate) - `RngCore` and `SeedableRng` are now part of `rand-core`. (#288) -- Added modules to help implementing RNGs `impl` and `le`. (#209, #228) -- added `Error` and `ErrorKind`. (#225) -- Added `CryptoRng` marker trait. (#273) -- Added `BlockRngCore` trait. (#281) -- Added `BlockRng` wrapper to help implemtations. (#281) -- Revised the `SeedableRng` trait. (#233) -- Removed default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) -- Added `RngCore::try_fill_bytes`. (#225) +- Add modules to help implementing RNGs `impl` and `le`. (#209, #228) +- Add `Error` and `ErrorKind`. (#225) +- Add `CryptoRng` marker trait. (#273) +- Add `BlockRngCore` trait. (#281) +- Add `BlockRng` wrapper to help implementations. (#281) +- Revise the `SeedableRng` trait. (#233) +- Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) +- Add `RngCore::try_fill_bytes`. (#225) ### Other traits and types -- Added `NewRng` trait. (#233) -- Added `SmallRng` wrapper. (#296) -- Rewritten `ReseedingRng` to only work with `BlockRngCore` (much improved performance). (#281) -- Deprecated `weak_rng`. Use `SmallRng` instead. (#296) -- Deprecated `random`. (#296) -- Deprecated `AsciiGenerator`. (#279) +- Add `NewRng` trait. (#233) +- Add `SmallRng` wrapper. (#296) +- Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281) +- Deprecate `weak_rng`. Use `SmallRng` instead. (#296) +- Deprecate `random`. (#296) +- Deprecate `AsciiGenerator`. (#279) ### Random number generators -- Switched `StdRng` and `thread_rng` to HC-128. (#277) -- Changed `thread_rng` reseeding threshold to 32 MiB. (#277) +- Switch `StdRng` and `thread_rng` to HC-128. (#277) +- Change `thread_rng` reseeding threshold to 32 MiB. (#277) - PRNGs no longer implement `Copy`. (#209) - `Debug` implementations no longer show internals. (#209) -- Implemented serialisation for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde-1` feature. (#189) -- Implemented `BlockRngCore` for `ChaCha` and `Hc128`. (#281) +- Implement serialisation for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde-1` feature. (#189) +- Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281) - All PRNGs are now portable across big- and little-endian architectures. (#209) - `Isaac64Rng::next_u32` no longer throws away half the results. (#209) -- Added `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) -- Added the HC-128 CSPRNG `Hc128Rng`. (#210) -- Added `ChaChaRng::set_rounds` method. (#243) -- Changes to `JitterRng` to get it's size down from 2112 to 24 bytes. (#251) +- Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209) +- Remove `IsaacWordRng` wrapper. (#277) +- Add the HC-128 CSPRNG `Hc128Rng`. (#210) +- Add `ChaChaRng::set_rounds` method. (#243) +- Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251) - Various performance improvements to all PRNGs. ### Platform support and `OsRng` -- Added support for CloudABI. (#224) -- Removed support for NaCl. (#225) -- Replaced stubs with proper WASM support in `OsRng`. (#272) -- Keep open only a single file descriptor for `OsRng`, on systems that do not have a syscall interface. (#239) +- Add support for CloudABI. (#224) +- Remove support for NaCl. (#225) +- Replace stubs with proper WASM support in `OsRng`. (#272) +- On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239) - Better error handling and reporting in `OsRng` (using new error type). (#225) - `OsRng` now uses non-blocking when available. (#225) -- Added `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) +- Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235) ### Distributions - New `Distribution` trait. (#256) -- Deprecated `Rand`, `Sample` and `IndependentSample` traits. (#256) -- Added a `Uniform` distribution (replaces most `Rand` implementations). (#256) -- Added `Binomial` and `Poisson` distributions. (#96) -- Added `Alphanumeric` distribution. (#279) -- Removed `Open01` and `Closed01` distributions, use `Uniform` instead (open distribution). (#274) -- Reworked `Range` type, making it possible to implement it for user types. (#274) -- Added `Range::new_inclusive` for inclusive ranges. (#274) -- Added `Range::sample_single` to allow for optimized implementations. (#274) -- Uses widening multiply method for much faster integer range reduction. (#274) +- Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256) +- Add a `Uniform` distribution (replaces most `Rand` implementations). (#256) +- Add `Binomial` and `Poisson` distributions. (#96) +- Add `Alphanumeric` distribution. (#279) +- Remove `Open01` and `Closed01` distributions, use `Uniform` instead (open distribution). (#274) +- Rework `Range` type, making it possible to implement it for user types. (#274) +- Add `Range::new_inclusive` for inclusive ranges. (#274) +- Add `Range::sample_single` to allow for optimized implementations. (#274) +- Use widening multiply method for much faster integer range reduction. (#274) - `Uniform` distributions for `bool` uses `Range`. (#274) - `Uniform` distributions for `bool` uses sign test. (#274) -- Added `HighPrecision01` distribution. (#320) +- Add `HighPrecision01` distribution. (#320) ## [0.4.2] - 2018-01-06 diff --git a/rand-core/CHANGELOG.md b/rand-core/CHANGELOG.md index c4d49793c6c..f41b9bba2e3 100644 --- a/rand-core/CHANGELOG.md +++ b/rand-core/CHANGELOG.md @@ -10,14 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `rand-core` crate (Split out of the Rand crate, changes here are relative to rand 0.4.2) - `RngCore` and `SeedableRng` are now part of `rand-core`. (#288) -- Added modules to help implementing RNGs `impl` and `le`. (#209, #228) -- added `Error` and `ErrorKind`. (#225) -- Added `CryptoRng` marker trait. (#273) -- Added `BlockRngCore` trait. (#281) -- Added `BlockRng` wrapper to help implemtations. (#281) -- Revised the `SeedableRng` trait. (#233) -- Removed default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) -- Added `RngCore::try_fill_bytes`. (#225) +- Add modules to help implementing RNGs `impl` and `le`. (#209, #228) +- Add `Error` and `ErrorKind`. (#225) +- Add `CryptoRng` marker trait. (#273) +- Add `BlockRngCore` trait. (#281) +- Add `BlockRng` wrapper to help implemtations. (#281) +- Revise the `SeedableRng` trait. (#233) +- Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288) +- Add `RngCore::try_fill_bytes`. (#225) ## [0.0.1] - 2017-09-14 Experimental version as part of the rand crate refactor.