2017-09-03 08:35:39 +02:00
|
|
|
# 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/)
|
2018-01-09 08:39:55 +02:00
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
2017-09-03 08:35:39 +02:00
|
|
|
|
2018-03-23 13:33:34 +01:00
|
|
|
A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
|
2018-03-22 12:34:19 +00:00
|
|
|
|
|
|
|
You may also find the [Update Guide](UPDATING.md) useful.
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-06-02 14:40:02 +01:00
|
|
|
## [0.6.0] - Unreleased
|
|
|
|
|
2018-07-30 13:28:40 +02:00
|
|
|
### Crate features and organisation
|
|
|
|
- The ISAAC and Xorshift RNGs have been moved to their own crates: `rand_isaac`
|
|
|
|
and `rand_xorshift`. (#551, #557)
|
|
|
|
- `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is
|
|
|
|
automatically enabled for Rust >= 1.27. (#566)
|
|
|
|
- Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This
|
|
|
|
renders the `i128_support` feature obsolete. It still exists for backwards
|
|
|
|
compatibility but does not have any effect. This breaks programs using Rand
|
|
|
|
with `i128_support` on nightlies older than Rust 1.26. (#571)
|
|
|
|
|
|
|
|
### New distributions
|
|
|
|
- Added sampling from the unit sphere and circle. (#567)
|
|
|
|
|
2018-06-02 14:40:02 +01:00
|
|
|
### Sequences module
|
|
|
|
- Optimised and changed return type of the `sample_indices` function. (#479)
|
2018-07-30 13:28:40 +02:00
|
|
|
- Added weighted sampling. (#518)
|
|
|
|
|
|
|
|
### Platform support
|
|
|
|
- Added support for wasm-bindgen. (#541)
|
|
|
|
- Added basic SIMD support. (#523)
|
2018-06-02 14:40:02 +01:00
|
|
|
|
2018-08-16 12:44:08 +01:00
|
|
|
|
2018-08-06 19:05:15 +01:00
|
|
|
## [0.5.5] - 2018-08-07
|
|
|
|
### Documentation
|
|
|
|
- Fix links in documentation (#582)
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-07-11 11:12:45 +01:00
|
|
|
## [0.5.4] - 2018-07-11
|
|
|
|
### Platform support
|
|
|
|
- Make `OsRng` work via WASM/stdweb for WebWorkers
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-06-25 23:59:44 -07:00
|
|
|
## [0.5.3] - 2018-06-26
|
|
|
|
### Platform support
|
|
|
|
- OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-06-16 09:55:38 +01:00
|
|
|
## [0.5.2] - 2018-06-18
|
|
|
|
### Platform support
|
|
|
|
- Hide `OsRng` and `JitterRng` on unsupported platforms (#512; fixes #503).
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-06-07 12:24:24 +01:00
|
|
|
## [0.5.1] - 2018-06-08
|
|
|
|
|
|
|
|
### New distributions
|
|
|
|
- Added Cauchy distribution. (#474, #486)
|
|
|
|
- Added Pareto distribution. (#495)
|
2018-05-30 09:26:13 +02:00
|
|
|
|
|
|
|
### Platform support and `OsRng`
|
|
|
|
- Remove blanket Unix implementation. (#484)
|
|
|
|
- Remove Wasm unimplemented stub. (#484)
|
|
|
|
- Dragonfly BSD: read from `/dev/random`. (#484)
|
|
|
|
- Bitrig: use `getentropy` like OpenBSD. (#484)
|
|
|
|
- Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. (#484)
|
|
|
|
- Emscripten, `stdweb`: split the read up in chunks. (#484)
|
|
|
|
- Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. (#484)
|
|
|
|
- Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. (#484)
|
|
|
|
- Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). (#484)
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-05-21 15:18:37 +02:00
|
|
|
## [0.5.0] - 2018-05-21
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
### Crate features and organisation
|
|
|
|
- Minimum Rust version update: 1.22.0. (#239)
|
2018-04-24 04:38:54 +00:00
|
|
|
- Create a separate `rand_core` crate. (#288)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Deprecate `rand_derive`. (#256)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Add `prelude` (and module reorganisation). (#435)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246)
|
2018-04-03 13:17:41 +02:00
|
|
|
- Add `serde1` feature for some PRNGs. (#189)
|
2018-03-26 11:45:00 +02:00
|
|
|
- `stdweb` feature for `OsRng` support on WASM via stdweb. (#272, #336)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
### `Rng` trait
|
|
|
|
- Split `Rng` in `RngCore` and `Rng` extension trait.
|
|
|
|
`next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265)
|
2018-03-22 13:24:36 +01:00
|
|
|
- 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)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
2018-03-23 13:33:34 +01:00
|
|
|
### `rand_core` crate
|
2018-04-16 15:28:12 +01:00
|
|
|
- `rand` now depends on new `rand_core` crate (#288)
|
2018-03-23 13:33:34 +01:00
|
|
|
- `RngCore` and `SeedableRng` are now part of `rand_core`. (#288)
|
2018-03-22 13:24:36 +01:00
|
|
|
- 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)
|
2018-04-13 09:58:03 +02:00
|
|
|
- Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Revise the `SeedableRng` trait. (#233)
|
|
|
|
- Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288)
|
|
|
|
- Add `RngCore::try_fill_bytes`. (#225)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
### Other traits and types
|
2018-04-15 18:48:18 +01:00
|
|
|
- Add `FromEntropy` trait. (#233, #375)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `SmallRng` wrapper. (#296)
|
|
|
|
- Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281)
|
|
|
|
- Deprecate `weak_rng`. Use `SmallRng` instead. (#296)
|
|
|
|
- Deprecate `AsciiGenerator`. (#279)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
### Random number generators
|
2018-03-22 13:24:36 +01:00
|
|
|
- Switch `StdRng` and `thread_rng` to HC-128. (#277)
|
2018-04-15 18:48:18 +01:00
|
|
|
- `StdRng` must now be created with `from_entropy` instead of `new`
|
2018-03-22 13:24:36 +01:00
|
|
|
- Change `thread_rng` reseeding threshold to 32 MiB. (#277)
|
2018-03-22 10:34:45 +01:00
|
|
|
- PRNGs no longer implement `Copy`. (#209)
|
|
|
|
- `Debug` implementations no longer show internals. (#209)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. (#383, #384)
|
2018-04-03 13:17:41 +02:00
|
|
|
- Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. (#189)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281)
|
2018-03-22 10:34:45 +01:00
|
|
|
- All PRNGs are now portable across big- and little-endian architectures. (#209)
|
|
|
|
- `Isaac64Rng::next_u32` no longer throws away half the results. (#209)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209)
|
|
|
|
- Add the HC-128 CSPRNG `Hc128Rng`. (#210)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Change ChaCha20 to have 64-bit counter and 64-bit stream. (#349)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251)
|
2018-03-22 10:34:45 +01:00
|
|
|
- Various performance improvements to all PRNGs.
|
|
|
|
|
|
|
|
### Platform support and `OsRng`
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add support for CloudABI. (#224)
|
|
|
|
- Remove support for NaCl. (#225)
|
2018-03-26 11:45:00 +02:00
|
|
|
- WASM support for `OsRng` via stdweb, behind the `stdweb` feature. (#272, #336)
|
2018-03-26 16:20:21 +02:00
|
|
|
- Use `getrandom` on more platforms for Linux, and on Android. (#338)
|
2018-03-25 16:42:11 +02:00
|
|
|
- Use the `SecRandomCopyBytes` interface on macOS. (#322)
|
2018-03-22 13:24:36 +01:00
|
|
|
- On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239)
|
2018-03-26 16:20:21 +02:00
|
|
|
- On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. (#338)
|
2018-03-22 10:34:45 +01:00
|
|
|
- Better error handling and reporting in `OsRng` (using new error type). (#225)
|
|
|
|
- `OsRng` now uses non-blocking when available. (#225)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
### Distributions
|
|
|
|
- New `Distribution` trait. (#256)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Add `Distribution::sample_iter` and `Rng::::sample_iter`. (#361)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256)
|
2018-04-02 10:29:11 +02:00
|
|
|
- Add a `Standard` distribution (replaces most `Rand` implementations). (#256)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `Binomial` and `Poisson` distributions. (#96)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Add `Bernoulli` dsitribution. (#411)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Add `Alphanumeric` distribution. (#279)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Remove `Closed01` distribution, add `OpenClosed01`. (#274, #420)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Rework `Range` type, making it possible to implement it for user types. (#274)
|
2018-05-15 15:52:32 +02:00
|
|
|
- Rename `Range` to `Uniform`. (#395)
|
|
|
|
- Add `Uniform::new_inclusive` for inclusive ranges. (#274)
|
2018-03-22 13:24:36 +01:00
|
|
|
- Use widening multiply method for much faster integer range reduction. (#274)
|
2018-05-15 15:52:32 +02:00
|
|
|
- `Standard` distribution for `char` uses `Uniform` internally. (#274)
|
|
|
|
- `Standard` distribution for `bool` uses sign test. (#274)
|
|
|
|
- Implement `Standard` distribution for `Wrapping<T>`. (#436)
|
|
|
|
- Implement `Uniform` distribution for `Duration`. (#427)
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
|
2018-08-16 12:20:30 +01:00
|
|
|
## [0.4.3] - 2018-08-16
|
|
|
|
### Fixed
|
|
|
|
- Use correct syscall number for PowerPC (#589)
|
|
|
|
|
2018-08-16 12:43:20 +01:00
|
|
|
|
2018-03-22 10:34:45 +01:00
|
|
|
## [0.4.2] - 2018-01-06
|
2018-01-05 11:32:55 +00:00
|
|
|
### Changed
|
2018-03-22 10:34:45 +01:00
|
|
|
- Use `winapi` on Windows
|
2018-01-05 11:32:55 +00:00
|
|
|
- Update for Fuchsia OS
|
|
|
|
- Remove dev-dependency on `log`
|
|
|
|
|
2018-03-22 10:34:45 +01:00
|
|
|
|
2017-12-17 19:06:15 +00:00
|
|
|
## [0.4.1] - 2017-12-17
|
|
|
|
### Added
|
|
|
|
- `no_std` support
|
|
|
|
|
2018-03-22 10:34:45 +01:00
|
|
|
|
2017-12-11 16:57:52 +00:00
|
|
|
## [0.4.0-pre.0] - 2017-12-11
|
2017-12-07 12:45:31 +00:00
|
|
|
### Added
|
|
|
|
- `JitterRng` added as a high-quality alternative entropy source using the
|
|
|
|
system timer
|
|
|
|
- new `seq` module with `sample_iter`, `sample_slice`, etc.
|
|
|
|
- WASM support via dummy implementations (fail at run-time)
|
|
|
|
- Additional benchmarks, covering generators and new seq code
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- `thread_rng` uses `JitterRng` if seeding from system time fails
|
|
|
|
(slower but more secure than previous method)
|
|
|
|
|
|
|
|
### Deprecated
|
|
|
|
- `sample` function deprecated (replaced by `sample_iter`)
|
2017-09-03 08:35:39 +02:00
|
|
|
|
2018-03-22 10:34:45 +01:00
|
|
|
|
|
|
|
## [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)
|
|
|
|
|
|
|
|
|
2017-12-07 12:45:31 +00:00
|
|
|
## [0.3.18] - 2017-11-06
|
|
|
|
### Changed
|
|
|
|
- `thread_rng` is seeded from the system time if `OsRng` fails
|
|
|
|
- `weak_rng` now uses `thread_rng` internally
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.17] - 2017-10-07
|
|
|
|
### Changed
|
|
|
|
- Fuchsia: Magenta was renamed Zircon
|
2017-09-03 08:35:39 +02:00
|
|
|
|
2017-12-07 12:45:31 +00:00
|
|
|
## [0.3.16] - 2017-07-27
|
2017-09-03 08:35:39 +02:00
|
|
|
### Added
|
|
|
|
- Implement Debug for mote non-public types
|
|
|
|
- implement `Rand` for (i|u)i128
|
|
|
|
- Support for Fuchsia
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- Add inline attribute to SampleRange::construct_range.
|
|
|
|
This improves the benchmark for sample in 11% and for shuffle in 16%.
|
|
|
|
- Use `RtlGenRandom` instead of `CryptGenRandom`
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.15] - 2016-11-26
|
|
|
|
### Added
|
|
|
|
- Add `Rng` trait method `choose_mut`
|
|
|
|
- Redox support
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- Use `arc4rand` for `OsRng` on FreeBSD.
|
|
|
|
- Use `arc4random(3)` for `OsRng` on OpenBSD.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.14] - 2016-02-13
|
|
|
|
### Fixed
|
|
|
|
- Inline definitions from winapi/advapi32, wich decreases build times
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.13] - 2016-01-09
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust 1.7.0-nightly (needed some extra type annotations)
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.12] - 2015-11-09
|
|
|
|
### Changed
|
|
|
|
- Replaced the methods in `next_f32` and `next_f64` with the technique described
|
|
|
|
Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more
|
|
|
|
uniform distribution.
|
|
|
|
- Depend on libc 0.2
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Fix iterator protocol issue in `rand::sample`
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.11] - 2015-08-31
|
|
|
|
### Added
|
|
|
|
- Implement `Rand` for arrays with n <= 32
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.10] - 2015-08-17
|
|
|
|
### Added
|
|
|
|
- Support for NaCl platforms
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box<R>` where `R: ?Sized + Rng`
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.9] - 2015-06-18
|
|
|
|
### Changed
|
|
|
|
- Use `winapi` for Windows API things
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Fixed test on stable/nightly
|
|
|
|
- Fix `getrandom` syscall number for aarch64-unknown-linux-gnu
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.8] - 2015-04-23
|
|
|
|
### Changed
|
|
|
|
- `log` is a dev dependency
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Fix race condition of atomics in `is_getrandom_available`
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.7] - 2015-04-03
|
|
|
|
### Fixed
|
|
|
|
- Derive Copy/Clone changes
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.6] - 2015-04-02
|
|
|
|
### Changed
|
|
|
|
- Move to stable Rust!
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.5] - 2015-04-01
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.4] - 2015-03-31
|
|
|
|
### Added
|
|
|
|
- Implement Clone for `Weighted`
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.3] - 2015-03-26
|
|
|
|
### Fixed
|
|
|
|
- Fix compile on Windows
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.2] - 2015-03-26
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.1] - 2015-03-26
|
|
|
|
### Fixed
|
|
|
|
- Fix compile on Windows
|
|
|
|
|
|
|
|
|
|
|
|
## [0.3.0] - 2015-03-25
|
|
|
|
### Changed
|
|
|
|
- Update to use log version 0.3.x
|
|
|
|
|
|
|
|
|
|
|
|
## [0.2.1] - 2015-03-22
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master
|
|
|
|
- Fixed iOS compilation
|
|
|
|
|
|
|
|
|
|
|
|
## [0.2.0] - 2015-03-06
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master (move from `old_io` to `std::io`)
|
|
|
|
|
|
|
|
|
|
|
|
## [0.1.4] - 2015-03-04
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master (use wrapping ops)
|
|
|
|
|
|
|
|
|
|
|
|
## [0.1.3] - 2015-02-20
|
|
|
|
### Fixed
|
|
|
|
- Compatible with Rust master
|
|
|
|
|
|
|
|
### Removed
|
2018-04-24 04:38:54 +00:00
|
|
|
- Removed Copy implementations from RNGs
|
2017-09-03 08:35:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
## [0.1.2] - 2015-02-03
|
|
|
|
### Added
|
|
|
|
- Imported functionality from `std::rand`, including:
|
|
|
|
- `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()`
|
|
|
|
- `ReaderRng`: A wrapper around any Reader to treat it as an RNG.
|
|
|
|
- Imported documentation from `std::rand`
|
|
|
|
- Imported tests from `std::rand`
|
|
|
|
|
|
|
|
|
|
|
|
## [0.1.1] - 2015-02-03
|
|
|
|
### Added
|
|
|
|
- Migrate to a cargo-compatible directory structure.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Do not use entropy during `gen_weighted_bool(1)`
|
|
|
|
|
|
|
|
|
|
|
|
## [Rust 0.12.0] - 2014-10-09
|
|
|
|
### Added
|
|
|
|
- Impl Rand for tuples of arity 11 and 12
|
|
|
|
- Include ChaCha pseudorandom generator
|
|
|
|
- Add `next_f64` and `next_f32` to Rng
|
|
|
|
- Implement Clone for PRNGs
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
- Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a
|
|
|
|
runtime is removed from Rust).
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by
|
|
|
|
informing the optimiser that indexing is never out-of-bounds.
|
|
|
|
|
|
|
|
### Removed
|
|
|
|
- Removed the Deprecated `choose_option`
|
|
|
|
|
|
|
|
|
|
|
|
## [Rust 0.11.0] - 2014-07-02
|
|
|
|
### Added
|
|
|
|
- document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random`
|
|
|
|
- `Rng::gen_iter()` which will return an infinite stream of random values
|
|
|
|
- `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters
|
|
|
|
|
|
|
|
### Changed
|
2018-03-22 10:34:45 +01:00
|
|
|
- Now only depends on libcore!
|
2017-09-03 08:35:39 +02:00
|
|
|
- Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()`
|
|
|
|
- Rename OSRng to OsRng
|
|
|
|
- The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`,
|
|
|
|
but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice
|
|
|
|
structure now has a lifetime associated with it.
|
|
|
|
- The `sample` method on `Rng` has been moved to a top-level function in the
|
|
|
|
`rand` module due to its dependence on `Vec`.
|
|
|
|
|
|
|
|
### Removed
|
|
|
|
- `Rng::gen_vec()` was removed. Previous behavior can be regained with
|
|
|
|
`rng.gen_iter().take(n).collect()`
|
|
|
|
- `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with
|
|
|
|
`rng.gen_ascii_chars().take(n).collect()`
|
|
|
|
- {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all
|
|
|
|
relied on being able to use an OSRng for seeding, but this is no longer
|
|
|
|
available in librand (where these types are defined). To retain the same
|
|
|
|
functionality, these types now implement the `Rand` trait so they can be
|
|
|
|
generated with a random seed from another random number generator. This allows
|
|
|
|
the stdlib to use an OSRng to create seeded instances of these RNGs.
|
|
|
|
- Rand implementations for `Box<T>` and `@T` were removed. These seemed to be
|
|
|
|
pretty rare in the codebase, and it allows for librand to not depend on
|
|
|
|
liballoc. Additionally, other pointer types like Rc<T> and Arc<T> were not
|
|
|
|
supported.
|
|
|
|
- Remove a slew of old deprecated functions
|
|
|
|
|
|
|
|
|
|
|
|
## [Rust 0.10] - 2014-04-03
|
|
|
|
### Changed
|
|
|
|
- replace `Rng.shuffle's` functionality with `.shuffle_mut`
|
|
|
|
- bubble up IO errors when creating an OSRng
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
- Use `fill()` instead of `read()`
|
|
|
|
- Rewrite OsRng in Rust for windows
|
|
|
|
|
|
|
|
## [0.10-pre] - 2014-03-02
|
|
|
|
### Added
|
|
|
|
- Seperate `rand` out of the standard library
|