| 1 |
# Changelog |
| 2 |
All notable changes to this project will be documented in this file. |
| 3 |
|
| 4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) |
| 5 |
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 6 |
|
| 7 |
A [separate changelog is kept for rand_core](https://github.com/rust-random/core/blob/master/CHANGELOG.md). |
| 8 |
|
| 9 |
You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful. |
| 10 |
|
| 11 |
## [0.10.2] — 2026-07-02 |
| 12 |
|
| 13 |
### Fixes |
| 14 |
- Fix possible memory safety violation due to deserialization of `UniformChar` from bad source ([#1790]) |
| 15 |
|
| 16 |
### Changes |
| 17 |
- Document required output order of fn `partial_shuffle` and apply `#[must_use]` ([#1769]) |
| 18 |
- Avoid usage of `unsafe` in contexts where non-local memory corruption could invalidate contract ([#1791]) |
| 19 |
|
| 20 |
[#1769]: https://github.com/rust-random/rand/pull/1769 |
| 21 |
[#1790]: https://github.com/rust-random/rand/pull/1790 |
| 22 |
[#1791]: https://github.com/rust-random/rand/pull/1791 |
| 23 |
|
| 24 |
## [0.10.1] — 2026-02-11 |
| 25 |
This release includes a fix for a soundness bug; see [#1763]. |
| 26 |
|
| 27 |
### Changes |
| 28 |
- Document panic behavior of `make_rng` and add `#[track_caller]` ([#1761]) |
| 29 |
- Deprecate feature `log` ([#1763]) |
| 30 |
|
| 31 |
[#1761]: https://github.com/rust-random/rand/pull/1761 |
| 32 |
[#1763]: https://github.com/rust-random/rand/pull/1763 |
| 33 |
|
| 34 |
## [0.10.0] - 2026-02-08 |
| 35 |
|
| 36 |
### Changes |
| 37 |
- The dependency on `rand_chacha` has been replaced with a dependency on `chacha20`. This changes the implementation behind `StdRng`, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in `chacha20` instead of `rand_chacha` ([#1642]). |
| 38 |
- Rename fns `IndexedRandom::choose_multiple` -> `sample`, `choose_multiple_array` -> `sample_array`, `choose_multiple_weighted` -> `sample_weighted`, struct `SliceChooseIter` -> `IndexedSamples` and fns `IteratorRandom::choose_multiple` -> `sample`, `choose_multiple_fill` -> `sample_fill` ([#1632]) |
| 39 |
- Use Edition 2024 and MSRV 1.85 ([#1653]) |
| 40 |
- Let `Fill` be implemented for element types, not sliceable types ([#1652]) |
| 41 |
- Fix `OsError::raw_os_error` on UEFI targets by returning `Option<usize>` ([#1665]) |
| 42 |
- Replace fn `TryRngCore::read_adapter(..) -> RngReadAdapter` with simpler struct `RngReader` ([#1669]) |
| 43 |
- Remove fns `SeedableRng::from_os_rng`, `try_from_os_rng` ([#1674]) |
| 44 |
- Remove `Clone` support for `StdRng`, `ReseedingRng` ([#1677]) |
| 45 |
- Use `postcard` instead of `bincode` to test the serde feature ([#1693]) |
| 46 |
- Avoid excessive allocation in `IteratorRandom::sample` when `amount` is much larger than iterator size ([#1695]) |
| 47 |
- Rename `os_rng` -> `sys_rng`, `OsRng` -> `SysRng`, `OsError` -> `SysError` ([#1697]) |
| 48 |
- Rename `Rng` -> `RngExt` as upstream `rand_core` has renamed `RngCore` -> `Rng` ([#1717]) |
| 49 |
|
| 50 |
### Additions |
| 51 |
- Add fns `IndexedRandom::choose_iter`, `choose_weighted_iter` ([#1632]) |
| 52 |
- Pub export `Xoshiro128PlusPlus`, `Xoshiro256PlusPlus` prngs ([#1649]) |
| 53 |
- Pub export `ChaCha8Rng`, `ChaCha12Rng`, `ChaCha20Rng` behind `chacha` feature ([#1659]) |
| 54 |
- Fn `rand::make_rng() -> R where R: SeedableRng` ([#1734]) |
| 55 |
|
| 56 |
### Removals |
| 57 |
- Removed `ReseedingRng` ([#1722]) |
| 58 |
- Removed unused feature "nightly" ([#1732]) |
| 59 |
- Removed feature `small_rng` ([#1732]) |
| 60 |
|
| 61 |
[#1632]: https://github.com/rust-random/rand/pull/1632 |
| 62 |
[#1642]: https://github.com/rust-random/rand/pull/1642 |
| 63 |
[#1649]: https://github.com/rust-random/rand/pull/1649 |
| 64 |
[#1652]: https://github.com/rust-random/rand/pull/1652 |
| 65 |
[#1653]: https://github.com/rust-random/rand/pull/1653 |
| 66 |
[#1659]: https://github.com/rust-random/rand/pull/1659 |
| 67 |
[#1665]: https://github.com/rust-random/rand/pull/1665 |
| 68 |
[#1669]: https://github.com/rust-random/rand/pull/1669 |
| 69 |
[#1674]: https://github.com/rust-random/rand/pull/1674 |
| 70 |
[#1677]: https://github.com/rust-random/rand/pull/1677 |
| 71 |
[#1693]: https://github.com/rust-random/rand/pull/1693 |
| 72 |
[#1695]: https://github.com/rust-random/rand/pull/1695 |
| 73 |
[#1697]: https://github.com/rust-random/rand/pull/1697 |
| 74 |
[#1717]: https://github.com/rust-random/rand/pull/1717 |
| 75 |
[#1722]: https://github.com/rust-random/rand/pull/1722 |
| 76 |
[#1732]: https://github.com/rust-random/rand/pull/1732 |
| 77 |
[#1734]: https://github.com/rust-random/rand/pull/1734 |
| 78 |
|
| 79 |
## [0.9.2] - 2025-07-20 |
| 80 |
|
| 81 |
### Deprecated |
| 82 |
- Deprecate `rand::rngs::mock` module and `StepRng` generator ([#1634]) |
| 83 |
|
| 84 |
### Additions |
| 85 |
- Enable `WeightedIndex<usize>` (de)serialization ([#1646]) |
| 86 |
|
| 87 |
## [0.9.1] - 2025-04-17 |
| 88 |
|
| 89 |
### Security and unsafe |
| 90 |
- Revise "not a crypto library" policy again ([#1565]) |
| 91 |
- Remove `zerocopy` dependency from `rand` ([#1579]) |
| 92 |
|
| 93 |
### Fixes |
| 94 |
- Fix feature `simd_support` for recent nightly rust ([#1586]) |
| 95 |
|
| 96 |
### Changes |
| 97 |
- Allow `fn rand::seq::index::sample_weighted` and `fn IndexedRandom::choose_multiple_weighted` to return fewer than `amount` results ([#1623]), reverting an undocumented change ([#1382]) to the previous release. |
| 98 |
|
| 99 |
### Additions |
| 100 |
- Add `rand::distr::Alphabetic` distribution. ([#1587]) |
| 101 |
- Re-export `rand_core` ([#1604]) |
| 102 |
|
| 103 |
[#1565]: https://github.com/rust-random/rand/pull/1565 |
| 104 |
[#1579]: https://github.com/rust-random/rand/pull/1579 |
| 105 |
[#1586]: https://github.com/rust-random/rand/pull/1586 |
| 106 |
[#1587]: https://github.com/rust-random/rand/pull/1587 |
| 107 |
[#1604]: https://github.com/rust-random/rand/pull/1604 |
| 108 |
[#1623]: https://github.com/rust-random/rand/pull/1623 |
| 109 |
[#1634]: https://github.com/rust-random/rand/pull/1634 |
| 110 |
[#1646]: https://github.com/rust-random/rand/pull/1646 |
| 111 |
|
| 112 |
## [0.9.0] - 2025-01-27 |
| 113 |
|
| 114 |
### Security and unsafe |
| 115 |
- Policy: "rand is not a crypto library" ([#1514]) |
| 116 |
- Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. ([#1379]) |
| 117 |
- Use `zerocopy` to replace some `unsafe` code ([#1349], [#1393], [#1446], [#1502]) |
| 118 |
|
| 119 |
### Dependencies |
| 120 |
- Bump the MSRV to 1.63.0 ([#1207], [#1246], [#1269], [#1341], [#1416], [#1536]); note that 1.60.0 may work for dependents when using `--ignore-rust-version` |
| 121 |
- Update to `rand_core` v0.9.0 ([#1558]) |
| 122 |
|
| 123 |
### Features |
| 124 |
- Support `std` feature without `getrandom` or `rand_chacha` ([#1354]) |
| 125 |
- Enable feature `small_rng` by default ([#1455]) |
| 126 |
- Remove implicit feature `rand_chacha`; use `std_rng` instead. ([#1473]) |
| 127 |
- Rename feature `serde1` to `serde` ([#1477]) |
| 128 |
- Rename feature `getrandom` to `os_rng` ([#1537]) |
| 129 |
- Add feature `thread_rng` ([#1547]) |
| 130 |
|
| 131 |
### API changes: rand_core traits |
| 132 |
- Add fn `RngCore::read_adapter` implementing `std::io::Read` ([#1267]) |
| 133 |
- Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` ([#1273]) |
| 134 |
- Add traits `TryRngCore`, `TryCryptoRng` ([#1424], [#1499]) |
| 135 |
- Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([#1424]) |
| 136 |
- Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([#1424]) |
| 137 |
- Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([#1491]) |
| 138 |
|
| 139 |
### API changes: Rng trait and top-level fns |
| 140 |
- Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude ([#1506]) |
| 141 |
- Remove fn `rand::random()` from the prelude ([#1506]) |
| 142 |
- Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` ([#1488]) |
| 143 |
- Re-introduce fn `Rng::gen_iter` as `random_iter` ([#1305], [#1500]) |
| 144 |
- Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 ([#1438]) |
| 145 |
- Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` ([#1505]) |
| 146 |
- Annotate panicking methods with `#[track_caller]` ([#1442], [#1447]) |
| 147 |
|
| 148 |
### API changes: RNGs |
| 149 |
- Fix `<SmallRng as SeedableRng>::Seed` size to 256 bits ([#1455]) |
| 150 |
- Remove first parameter (`rng`) of `ReseedingRng::new` ([#1533]) |
| 151 |
|
| 152 |
### API changes: Sequences |
| 153 |
- Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` ([#1382]) |
| 154 |
- Add `IndexedRandom::choose_multiple_array`, `index::sample_array` ([#1453], [#1469]) |
| 155 |
|
| 156 |
### API changes: Distributions: renames |
| 157 |
- Rename module `rand::distributions` to `rand::distr` ([#1470]) |
| 158 |
- Rename distribution `Standard` to `StandardUniform` ([#1526]) |
| 159 |
- Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` ([#1548]) |
| 160 |
- Rename trait `distr::DistString` -> `distr::SampleString` ([#1548]) |
| 161 |
- Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` ([#1548]) |
| 162 |
|
| 163 |
### API changes: Distributions |
| 164 |
- Relax `Sized` bound on `Distribution<T> for &D` ([#1278]) |
| 165 |
- Remove impl of `Distribution<Option<T>>` for `StandardUniform` ([#1526]) |
| 166 |
- Let distribution `StandardUniform` support all `NonZero*` types ([#1332]) |
| 167 |
- Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) ([#1229]) |
| 168 |
- Distribution `Uniform` implements `TryFrom` instead of `From` for ranges ([#1229]) |
| 169 |
- Add `UniformUsize` ([#1487]) |
| 170 |
- Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight ([#1487]) |
| 171 |
- Add impl `DistString` for distributions `Slice<char>` and `Uniform<char>` ([#1315]) |
| 172 |
- Add fn `Slice::num_choices` ([#1402]) |
| 173 |
- Add fn `p()` for distribution `Bernoulli` to access probability ([#1481]) |
| 174 |
|
| 175 |
### API changes: Weighted distributions |
| 176 |
- Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there ([#1548]) |
| 177 |
- Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow ([#1353]) |
| 178 |
- Add fns `weight, weights, total_weight` to distribution `WeightedIndex` ([#1420]) |
| 179 |
- Rename enum `WeightedError` to `weighted::Error`, revising variants ([#1382]) and mark as `#[non_exhaustive]` ([#1480]) |
| 180 |
|
| 181 |
### API changes: SIMD |
| 182 |
- Switch to `std::simd`, expand SIMD & docs ([#1239]) |
| 183 |
|
| 184 |
### Reproducibility-breaking changes |
| 185 |
- Make `ReseedingRng::reseed` discard remaining data from the last block generated ([#1379]) |
| 186 |
- Change fn `SmallRng::seed_from_u64` implementation ([#1203]) |
| 187 |
- Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` ([#1462]) |
| 188 |
- Fix portability of distribution `Slice` ([#1469]) |
| 189 |
- Make `Uniform` for `usize` portable via `UniformUsize` ([#1487]) |
| 190 |
- Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory ([#1530]) |
| 191 |
|
| 192 |
### Reproducibility-breaking optimisations |
| 193 |
- Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` ([#1277]) |
| 194 |
- New, faster algorithms for `IteratorRandom::choose` and `choose_stable` ([#1268]) |
| 195 |
- New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` ([#1272]) |
| 196 |
- Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; [#1287]) |
| 197 |
- Optimize fn `sample_single_inclusive` for floats (+~20% perf) ([#1289]) |
| 198 |
|
| 199 |
### Other optimisations |
| 200 |
- Improve `SmallRng` initialization performance ([#1482]) |
| 201 |
- Optimise SIMD widening multiply ([#1247]) |
| 202 |
|
| 203 |
### Other |
| 204 |
- Add `Cargo.lock.msrv` file ([#1275]) |
| 205 |
- Reformat with `rustfmt` and enforce ([#1448]) |
| 206 |
- Apply Clippy suggestions and enforce ([#1448], [#1474]) |
| 207 |
- Move all benchmarks to new `benches` crate ([#1329], [#1439]) and migrate to Criterion ([#1490]) |
| 208 |
|
| 209 |
### Documentation |
| 210 |
- Improve `ThreadRng` related docs ([#1257]) |
| 211 |
- Docs: enable experimental `--generate-link-to-definition` feature ([#1327]) |
| 212 |
- Better doc of crate features, use `doc_auto_cfg` ([#1411], [#1450]) |
| 213 |
|
| 214 |
[#1203]: https://github.com/rust-random/rand/pull/1203 |
| 215 |
[#1207]: https://github.com/rust-random/rand/pull/1207 |
| 216 |
[#1229]: https://github.com/rust-random/rand/pull/1229 |
| 217 |
[#1239]: https://github.com/rust-random/rand/pull/1239 |
| 218 |
[#1246]: https://github.com/rust-random/rand/pull/1246 |
| 219 |
[#1247]: https://github.com/rust-random/rand/pull/1247 |
| 220 |
[#1257]: https://github.com/rust-random/rand/pull/1257 |
| 221 |
[#1267]: https://github.com/rust-random/rand/pull/1267 |
| 222 |
[#1268]: https://github.com/rust-random/rand/pull/1268 |
| 223 |
[#1269]: https://github.com/rust-random/rand/pull/1269 |
| 224 |
[#1272]: https://github.com/rust-random/rand/pull/1272 |
| 225 |
[#1273]: https://github.com/rust-random/rand/pull/1273 |
| 226 |
[#1275]: https://github.com/rust-random/rand/pull/1275 |
| 227 |
[#1277]: https://github.com/rust-random/rand/pull/1277 |
| 228 |
[#1278]: https://github.com/rust-random/rand/pull/1278 |
| 229 |
[#1287]: https://github.com/rust-random/rand/pull/1287 |
| 230 |
[#1289]: https://github.com/rust-random/rand/pull/1289 |
| 231 |
[#1305]: https://github.com/rust-random/rand/pull/1305 |
| 232 |
[#1315]: https://github.com/rust-random/rand/pull/1315 |
| 233 |
[#1327]: https://github.com/rust-random/rand/pull/1327 |
| 234 |
[#1329]: https://github.com/rust-random/rand/pull/1329 |
| 235 |
[#1332]: https://github.com/rust-random/rand/pull/1332 |
| 236 |
[#1341]: https://github.com/rust-random/rand/pull/1341 |
| 237 |
[#1349]: https://github.com/rust-random/rand/pull/1349 |
| 238 |
[#1353]: https://github.com/rust-random/rand/pull/1353 |
| 239 |
[#1354]: https://github.com/rust-random/rand/pull/1354 |
| 240 |
[#1379]: https://github.com/rust-random/rand/pull/1379 |
| 241 |
[#1382]: https://github.com/rust-random/rand/pull/1382 |
| 242 |
[#1393]: https://github.com/rust-random/rand/pull/1393 |
| 243 |
[#1402]: https://github.com/rust-random/rand/pull/1402 |
| 244 |
[#1411]: https://github.com/rust-random/rand/pull/1411 |
| 245 |
[#1416]: https://github.com/rust-random/rand/pull/1416 |
| 246 |
[#1420]: https://github.com/rust-random/rand/pull/1420 |
| 247 |
[#1424]: https://github.com/rust-random/rand/pull/1424 |
| 248 |
[#1438]: https://github.com/rust-random/rand/pull/1438 |
| 249 |
[#1439]: https://github.com/rust-random/rand/pull/1439 |
| 250 |
[#1442]: https://github.com/rust-random/rand/pull/1442 |
| 251 |
[#1446]: https://github.com/rust-random/rand/pull/1446 |
| 252 |
[#1447]: https://github.com/rust-random/rand/pull/1447 |
| 253 |
[#1448]: https://github.com/rust-random/rand/pull/1448 |
| 254 |
[#1450]: https://github.com/rust-random/rand/pull/1450 |
| 255 |
[#1453]: https://github.com/rust-random/rand/pull/1453 |
| 256 |
[#1455]: https://github.com/rust-random/rand/pull/1455 |
| 257 |
[#1462]: https://github.com/rust-random/rand/pull/1462 |
| 258 |
[#1469]: https://github.com/rust-random/rand/pull/1469 |
| 259 |
[#1470]: https://github.com/rust-random/rand/pull/1470 |
| 260 |
[#1473]: https://github.com/rust-random/rand/pull/1473 |
| 261 |
[#1474]: https://github.com/rust-random/rand/pull/1474 |
| 262 |
[#1477]: https://github.com/rust-random/rand/pull/1477 |
| 263 |
[#1480]: https://github.com/rust-random/rand/pull/1480 |
| 264 |
[#1481]: https://github.com/rust-random/rand/pull/1481 |
| 265 |
[#1482]: https://github.com/rust-random/rand/pull/1482 |
| 266 |
[#1487]: https://github.com/rust-random/rand/pull/1487 |
| 267 |
[#1488]: https://github.com/rust-random/rand/pull/1488 |
| 268 |
[#1490]: https://github.com/rust-random/rand/pull/1490 |
| 269 |
[#1491]: https://github.com/rust-random/rand/pull/1491 |
| 270 |
[#1499]: https://github.com/rust-random/rand/pull/1499 |
| 271 |
[#1500]: https://github.com/rust-random/rand/pull/1500 |
| 272 |
[#1502]: https://github.com/rust-random/rand/pull/1502 |
| 273 |
[#1505]: https://github.com/rust-random/rand/pull/1505 |
| 274 |
[#1506]: https://github.com/rust-random/rand/pull/1506 |
| 275 |
[#1514]: https://github.com/rust-random/rand/pull/1514 |
| 276 |
[#1526]: https://github.com/rust-random/rand/pull/1526 |
| 277 |
[#1530]: https://github.com/rust-random/rand/pull/1530 |
| 278 |
[#1533]: https://github.com/rust-random/rand/pull/1533 |
| 279 |
[#1536]: https://github.com/rust-random/rand/pull/1536 |
| 280 |
[#1537]: https://github.com/rust-random/rand/pull/1537 |
| 281 |
[#1547]: https://github.com/rust-random/rand/pull/1547 |
| 282 |
[#1548]: https://github.com/rust-random/rand/pull/1548 |
| 283 |
[#1558]: https://github.com/rust-random/rand/pull/1558 |
| 284 |
|
| 285 |
## [0.8.5] - 2021-08-20 |
| 286 |
|
| 287 |
### Fixes |
| 288 |
- Fix build on non-32/64-bit architectures ([#1144]) |
| 289 |
- Fix "min_const_gen" feature for `no_std` ([#1173]) |
| 290 |
- Check `libc::pthread_atfork` return value with panic on error ([#1178]) |
| 291 |
- More robust reseeding in case `ReseedingRng` is used from a fork handler ([#1178]) |
| 292 |
- Fix nightly: remove unused `slice_partition_at_index` feature ([#1215]) |
| 293 |
- Fix nightly + `simd_support`: update `packed_simd` ([#1216]) |
| 294 |
|
| 295 |
### Rngs |
| 296 |
- `StdRng`: Switch from HC128 to ChaCha12 on emscripten ([#1142]). |
| 297 |
We now use ChaCha12 on all platforms. |
| 298 |
|
| 299 |
### Documentation |
| 300 |
- Added docs about rand's use of const generics ([#1150]) |
| 301 |
- Better random chars example ([#1157]) |
| 302 |
|
| 303 |
[#1142]: https://github.com/rust-random/rand/pull/1142 |
| 304 |
[#1144]: https://github.com/rust-random/rand/pull/1144 |
| 305 |
[#1150]: https://github.com/rust-random/rand/pull/1150 |
| 306 |
[#1157]: https://github.com/rust-random/rand/pull/1157 |
| 307 |
[#1173]: https://github.com/rust-random/rand/pull/1173 |
| 308 |
[#1178]: https://github.com/rust-random/rand/pull/1178 |
| 309 |
[#1215]: https://github.com/rust-random/rand/pull/1215 |
| 310 |
[#1216]: https://github.com/rust-random/rand/pull/1216 |
| 311 |
|
| 312 |
## [0.8.4] - 2021-06-15 |
| 313 |
|
| 314 |
### Additions |
| 315 |
- Use const-generics to support arrays of all sizes ([#1104]) |
| 316 |
- Implement `Clone` and `Copy` for `Alphanumeric` ([#1126]) |
| 317 |
- Add `Distribution::map` to derive a distribution using a closure ([#1129]) |
| 318 |
- Add `Slice` distribution ([#1107]) |
| 319 |
- Add `DistString` trait with impls for `Standard` and `Alphanumeric` ([#1133]) |
| 320 |
|
| 321 |
### Other |
| 322 |
- Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments ([#1094], [#1108]) |
| 323 |
- Add range overflow check in `Uniform` float distributions ([#1108]) |
| 324 |
- Deprecate `rngs::adapter::ReadRng` ([#1130]) |
| 325 |
|
| 326 |
## [0.8.3] - 2021-01-25 |
| 327 |
|
| 328 |
### Fixes |
| 329 |
- Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` ([#1088]) |
| 330 |
|
| 331 |
## [0.8.2] - 2021-01-12 |
| 332 |
|
| 333 |
### Fixes |
| 334 |
- Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when providing a full integer range (eg `0..=MAX`) ([#1087]) |
| 335 |
|
| 336 |
## [0.8.1] - 2020-12-31 |
| 337 |
|
| 338 |
### Other |
| 339 |
- Enable all stable features in the playground ([#1081]) |
| 340 |
## [0.8.0] - 2020-12-18 |
| 341 |
|
| 342 |
### Platform support |
| 343 |
- The minimum supported Rust version is now 1.36 ([#1011]) |
| 344 |
- `getrandom` updated to v0.2 ([#1041]) |
| 345 |
- Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support, see the [getrandom documentation](https://docs.rs/getrandom/latest). ([#948]) |
| 346 |
- `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead of native-Endian, affecting results on Big-Endian platforms ([#1061]) |
| 347 |
- The `nightly` feature no longer implies the `simd_support` feature ([#1048]) |
| 348 |
- Fix `simd_support` feature to work on current nightlies ([#1056]) |
| 349 |
|
| 350 |
### Rngs |
| 351 |
- `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors ([#1035]) |
| 352 |
- `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is also supported. Note that `a` and `b` can no longer be references or SIMD types. ([#744], [#1003]) |
| 353 |
- Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` ([#940]) |
| 354 |
- Restrict `rand::rngs::adapter` to `std` ([#1027]; see also [#928]) |
| 355 |
- `StdRng`: add new `std_rng` feature flag (enabled by default, but might need to be used if disabling default crate features) ([#948]) |
| 356 |
- `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance ([#1028]) |
| 357 |
- `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ ([#1038]) |
| 358 |
|
| 359 |
### Sequences |
| 360 |
- Add `IteratorRandom::choose_stable` as an alternative to `choose` which does not depend on size hints ([#1057]) |
| 361 |
- Improve accuracy and performance of `IteratorRandom::choose` ([#1059]) |
| 362 |
- Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method ([#1007]) |
| 363 |
- Add value stability tests for `seq` module ([#933]) |
| 364 |
|
| 365 |
### Misc |
| 366 |
- Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` ([#979]) |
| 367 |
- Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` ([#974]) |
| 368 |
- Drop some unsafe code ([#962], [#963], [#1011]) |
| 369 |
- Reduce packaged crate size ([#983]) |
| 370 |
- Migrate to GitHub Actions from Travis+AppVeyor ([#1073]) |
| 371 |
|
| 372 |
### Distributions |
| 373 |
- `Alphanumeric` samples bytes instead of chars ([#935]) |
| 374 |
- `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` ([#1068]) |
| 375 |
- Add `UniformSampler::sample_single_inclusive` ([#1003]) |
| 376 |
|
| 377 |
#### Weighted sampling |
| 378 |
- Implement weighted sampling without replacement ([#976], [#1013]) |
| 379 |
- `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`. The simpler alternative `rand::distribution::WeightedIndex` remains. ([#945]) |
| 380 |
- Improve treatment of rounding errors in `WeightedIndex::update_weights` ([#956]) |
| 381 |
- `WeightedIndex`: return error on NaN instead of panic ([#1005]) |
| 382 |
|
| 383 |
### Documentation |
| 384 |
- Document types supported by `random` ([#994]) |
| 385 |
- Document notes on password generation ([#995]) |
| 386 |
- Note that `SmallRng` may not be the best choice for performance and in some other cases ([#1038]) |
| 387 |
- Use `doc(cfg)` to annotate feature-gated items ([#1019]) |
| 388 |
- Adjust README ([#1065]) |
| 389 |
|
| 390 |
[#744]: https://github.com/rust-random/rand/pull/744 |
| 391 |
[#933]: https://github.com/rust-random/rand/pull/933 |
| 392 |
[#935]: https://github.com/rust-random/rand/pull/935 |
| 393 |
[#940]: https://github.com/rust-random/rand/pull/940 |
| 394 |
[#945]: https://github.com/rust-random/rand/pull/945 |
| 395 |
[#948]: https://github.com/rust-random/rand/pull/948 |
| 396 |
[#956]: https://github.com/rust-random/rand/pull/956 |
| 397 |
[#962]: https://github.com/rust-random/rand/pull/962 |
| 398 |
[#963]: https://github.com/rust-random/rand/pull/963 |
| 399 |
[#974]: https://github.com/rust-random/rand/pull/974 |
| 400 |
[#976]: https://github.com/rust-random/rand/pull/976 |
| 401 |
[#979]: https://github.com/rust-random/rand/pull/979 |
| 402 |
[#983]: https://github.com/rust-random/rand/pull/983 |
| 403 |
[#994]: https://github.com/rust-random/rand/pull/994 |
| 404 |
[#995]: https://github.com/rust-random/rand/pull/995 |
| 405 |
[#1003]: https://github.com/rust-random/rand/pull/1003 |
| 406 |
[#1005]: https://github.com/rust-random/rand/pull/1005 |
| 407 |
[#1007]: https://github.com/rust-random/rand/pull/1007 |
| 408 |
[#1011]: https://github.com/rust-random/rand/pull/1011 |
| 409 |
[#1013]: https://github.com/rust-random/rand/pull/1013 |
| 410 |
[#1019]: https://github.com/rust-random/rand/pull/1019 |
| 411 |
[#1027]: https://github.com/rust-random/rand/pull/1027 |
| 412 |
[#1028]: https://github.com/rust-random/rand/pull/1028 |
| 413 |
[#1035]: https://github.com/rust-random/rand/pull/1035 |
| 414 |
[#1038]: https://github.com/rust-random/rand/pull/1038 |
| 415 |
[#1041]: https://github.com/rust-random/rand/pull/1041 |
| 416 |
[#1048]: https://github.com/rust-random/rand/pull/1048 |
| 417 |
[#1056]: https://github.com/rust-random/rand/pull/1056 |
| 418 |
[#1057]: https://github.com/rust-random/rand/pull/1057 |
| 419 |
[#1059]: https://github.com/rust-random/rand/pull/1059 |
| 420 |
[#1061]: https://github.com/rust-random/rand/pull/1061 |
| 421 |
[#1065]: https://github.com/rust-random/rand/pull/1065 |
| 422 |
[#1068]: https://github.com/rust-random/rand/pull/1068 |
| 423 |
[#1073]: https://github.com/rust-random/rand/pull/1073 |
| 424 |
|
| 425 |
## [0.7.3] - 2020-01-10 |
| 426 |
|
| 427 |
### Fixes |
| 428 |
- The `Bernoulli` distribution constructors now reports an error on NaN and on `denominator == 0`. ([#925]) |
| 429 |
- Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation ([#928]) |
| 430 |
- Fix documentation on the precision of generated floating-point values |
| 431 |
|
| 432 |
### Changes |
| 433 |
- Unix: make libc dependency optional; only use fork protection with std feature ([#928]) |
| 434 |
|
| 435 |
### Additions |
| 436 |
- Implement `std::error::Error` for `BernoulliError` ([#919]) |
| 437 |
|
| 438 |
## [0.7.2] - 2019-09-16 |
| 439 |
|
| 440 |
### Fixes |
| 441 |
- Fix dependency on `rand_core` 0.5.1 ([#890]) |
| 442 |
|
| 443 |
### Additions |
| 444 |
- Unit tests for value stability of distributions added ([#888]) |
| 445 |
|
| 446 |
## [0.7.1] - 2019-09-13 |
| 447 |
|
| 448 |
### Yanked |
| 449 |
This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1 but specifies a dependency on version 0.5.0 ([#890]), causing broken builds when updating from `rand 0.7.0` without also updating `rand_core`. |
| 450 |
|
| 451 |
### Fixes |
| 452 |
- Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature ([#844]) |
| 453 |
- `alloc` feature in `no_std` is available since Rust 1.36 ([#856]) |
| 454 |
- Fix or squelch issues from Clippy lints ([#840]) |
| 455 |
|
| 456 |
### Additions |
| 457 |
- Add a `no_std` target to CI to continuously evaluate `no_std` status ([#844]) |
| 458 |
- `WeightedIndex`: allow adjusting a sub-set of weights ([#866]) |
| 459 |
|
| 460 |
## [0.7.0] - 2019-06-28 |
| 461 |
|
| 462 |
### Fixes |
| 463 |
- Fix incorrect pointer usages revealed by Miri testing ([#780], [#781]) |
| 464 |
- Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints ([#809]) |
| 465 |
|
| 466 |
### Crate |
| 467 |
- Bumped MSRV (min supported Rust version) to 1.32.0 |
| 468 |
- Updated to Rust Edition 2018 ([#823], [#824]) |
| 469 |
- Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates ([#759], [#765]) |
| 470 |
- Remove dependency on `winapi` ([#724]) |
| 471 |
- Removed all `build.rs` files ([#824]) |
| 472 |
- Removed code already deprecated in version 0.6 ([#757]) |
| 473 |
- Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. [#830]) |
| 474 |
- Many documentation changes |
| 475 |
|
| 476 |
### rand_core |
| 477 |
- Updated to `rand_core` 0.5.0 |
| 478 |
- `Error` type redesigned with new API ([#800]) |
| 479 |
- Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` ([#800]) |
| 480 |
- `SeedableRng::from_rng` is now expected to be value-stable ([#815]) |
| 481 |
|
| 482 |
### Standard RNGs |
| 483 |
- OS interface moved from `rand_os` to new `getrandom` crate ([#765], [getrandom](https://github.com/rust-random/getrandom)) |
| 484 |
- Use ChaCha for `StdRng` and `ThreadRng` ([#792]) |
| 485 |
- Feature-gate `SmallRng` ([#792]) |
| 486 |
- `ThreadRng` now supports `Copy` ([#758]) |
| 487 |
- Deprecated `EntropyRng` ([#765]) |
| 488 |
- Enable fork protection of `ReseedingRng` without `std` ([#724]) |
| 489 |
|
| 490 |
### Distributions |
| 491 |
- Many distributions have been moved to `rand_distr` ([#761]) |
| 492 |
- `Bernoulli::new` constructor now returns a `Result` ([#803]) |
| 493 |
- `Distribution::sample_iter` adjusted for more flexibility ([#758]) |
| 494 |
- Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling ([#692]) |
| 495 |
- Support sampling `NonZeroU*` types with the `Standard` distribution ([#728]) |
| 496 |
- Optimised `Binomial` distribution sampling ([#735], [#740], [#752]) |
| 497 |
- Optimised SIMD float sampling ([#739]) |
| 498 |
|
| 499 |
### Sequences |
| 500 |
- Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible ([#809]) |
| 501 |
|
| 502 |
[#692]: https://github.com/rust-random/rand/pull/692 |
| 503 |
[#724]: https://github.com/rust-random/rand/pull/724 |
| 504 |
[#728]: https://github.com/rust-random/rand/pull/728 |
| 505 |
[#735]: https://github.com/rust-random/rand/pull/735 |
| 506 |
[#739]: https://github.com/rust-random/rand/pull/739 |
| 507 |
[#740]: https://github.com/rust-random/rand/pull/740 |
| 508 |
[#752]: https://github.com/rust-random/rand/pull/752 |
| 509 |
[#757]: https://github.com/rust-random/rand/pull/757 |
| 510 |
[#758]: https://github.com/rust-random/rand/pull/758 |
| 511 |
[#759]: https://github.com/rust-random/rand/pull/759 |
| 512 |
[#761]: https://github.com/rust-random/rand/pull/761 |
| 513 |
[#765]: https://github.com/rust-random/rand/pull/765 |
| 514 |
[#780]: https://github.com/rust-random/rand/pull/780 |
| 515 |
[#781]: https://github.com/rust-random/rand/pull/781 |
| 516 |
[#792]: https://github.com/rust-random/rand/pull/792 |
| 517 |
[#800]: https://github.com/rust-random/rand/pull/800 |
| 518 |
[#803]: https://github.com/rust-random/rand/pull/803 |
| 519 |
[#809]: https://github.com/rust-random/rand/pull/809 |
| 520 |
[#815]: https://github.com/rust-random/rand/pull/815 |
| 521 |
[#823]: https://github.com/rust-random/rand/pull/823 |
| 522 |
[#824]: https://github.com/rust-random/rand/pull/824 |
| 523 |
[#830]: https://github.com/rust-random/rand/pull/830 |
| 524 |
[#840]: https://github.com/rust-random/rand/pull/840 |
| 525 |
[#844]: https://github.com/rust-random/rand/pull/844 |
| 526 |
[#856]: https://github.com/rust-random/rand/pull/856 |
| 527 |
[#866]: https://github.com/rust-random/rand/pull/866 |
| 528 |
[#888]: https://github.com/rust-random/rand/pull/888 |
| 529 |
[#890]: https://github.com/rust-random/rand/pull/890 |
| 530 |
[#919]: https://github.com/rust-random/rand/pull/919 |
| 531 |
[#925]: https://github.com/rust-random/rand/pull/925 |
| 532 |
[#928]: https://github.com/rust-random/rand/pull/928 |
| 533 |
|
| 534 |
## [0.6.5] - 2019-01-28 |
| 535 |
|
| 536 |
### Crates |
| 537 |
- Update `rand_core` to 0.4 ([#703]) |
| 538 |
- Move `JitterRng` to its own crate ([#685]) |
| 539 |
- Add a wasm-bindgen test crate ([#696]) |
| 540 |
|
| 541 |
### Platforms |
| 542 |
- Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng |
| 543 |
|
| 544 |
### Doc |
| 545 |
- Use RFC 1946 for doc links ([#691]) |
| 546 |
- Fix some doc links and notes ([#711]) |
| 547 |
|
| 548 |
## [0.6.4] - 2019-01-08 |
| 549 |
|
| 550 |
### Fixes |
| 551 |
- Move wasm-bindgen shims to correct crate ([#686]) |
| 552 |
- Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindings ([#686]) |
| 553 |
|
| 554 |
## [0.6.3] - 2019-01-04 |
| 555 |
|
| 556 |
### Fixes |
| 557 |
- Make the `std` feature require the optional `rand_os` dependency ([#675]) |
| 558 |
- Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage ([#674]) |
| 559 |
|
| 560 |
## [0.6.2] - 2019-01-04 |
| 561 |
|
| 562 |
### Additions |
| 563 |
- Add `Default` for `ThreadRng` ([#657]) |
| 564 |
- Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency ([#643]) |
| 565 |
- Add `rand_xoshiro` sub-crate, plus benchmarks ([#642], [#668]) |
| 566 |
|
| 567 |
### Fixes |
| 568 |
- Fix bias in `UniformInt::sample_single` ([#662]) |
| 569 |
- Use `autocfg` instead of `rustc_version` for rustc version detection ([#664]) |
| 570 |
- Disable `i128` and `u128` if the `target_os` is `emscripten` ([#671]: work-around Emscripten limitation) |
| 571 |
- CI fixes ([#660], [#671]) |
| 572 |
|
| 573 |
### Optimisations |
| 574 |
- Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR) |
| 575 |
|
| 576 |
## [0.6.1] - 2018-11-22 |
| 577 |
- Support sampling `Duration` also for `no_std` (only since Rust 1.25) ([#649]) |
| 578 |
- Disable default features of `libc` ([#647]) |
| 579 |
|
| 580 |
## [0.6.0] - 2018-11-14 |
| 581 |
|
| 582 |
### Project organisation |
| 583 |
- Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand) to [rust-random](https://github.com/rust-random/rand)! ([#578]) |
| 584 |
- Created [The Rust Random Book](https://rust-random.github.io/book/) ([source](https://github.com/rust-random/book)) |
| 585 |
- Update copyright and licence notices ([#591], [#611]) |
| 586 |
- Migrate policy documentation from the wiki ([#544]) |
| 587 |
|
| 588 |
### Platforms |
| 589 |
- Add fork protection on Unix ([#466]) |
| 590 |
- Added support for wasm-bindgen ([#541], [#559], [#562], [#600]) |
| 591 |
- Enable `OsRng` for powerpc64, sparc and sparc64 ([#609]) |
| 592 |
- Use `syscall` from `libc` on Linux instead of redefining it ([#629]) |
| 593 |
|
| 594 |
### RNGs |
| 595 |
- Switch `SmallRng` to use PCG ([#623]) |
| 596 |
- Implement `Pcg32` and `Pcg64Mcg` generators ([#632]) |
| 597 |
- Move ISAAC RNGs to a dedicated crate ([#551]) |
| 598 |
- Move Xorshift RNG to its own crate ([#557]) |
| 599 |
- Move ChaCha and HC128 RNGs to dedicated crates ([#607], [#636]) |
| 600 |
- Remove usage of `Rc` from `ThreadRng` ([#615]) |
| 601 |
|
| 602 |
### Sampling and distributions |
| 603 |
- Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` ([#491]) |
| 604 |
- Make `Uniform` strictly respect `f32` / `f64` high/low bounds ([#477]) |
| 605 |
- Allow `gen_range` and `Uniform` to work on non-`Copy` types ([#506]) |
| 606 |
- `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is automatically enabled for Rust >= 1.27. ([#566]) |
| 607 |
- Implement `TrustedLen` and `FusedIterator` for `DistIter` ([#620]) |
| 608 |
|
| 609 |
#### New distributions |
| 610 |
- Add the `Dirichlet` distribution ([#485]) |
| 611 |
- Added sampling from the unit sphere and circle ([#567]) |
| 612 |
- Implement the triangular distribution ([#575]) |
| 613 |
- Implement the Weibull distribution ([#576]) |
| 614 |
- Implement the Beta distribution ([#574]) |
| 615 |
|
| 616 |
#### Optimisations |
| 617 |
- Optimise `Bernoulli::new` ([#500]) |
| 618 |
- Optimise `char` sampling ([#519]) |
| 619 |
- Optimise sampling of `std::time::Duration` ([#583]) |
| 620 |
|
| 621 |
### Sequences |
| 622 |
- Redesign the `seq` module ([#483], [#515]) |
| 623 |
- Add `WeightedIndex` and `choose_weighted` ([#518], [#547]) |
| 624 |
- Optimised and changed return type of the `sample_indices` function ([#479]) |
| 625 |
- Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` ([#593]) |
| 626 |
|
| 627 |
### SIMD |
| 628 |
- Support for generating SIMD types ([#523], [#542], [#561], [#630]) |
| 629 |
|
| 630 |
### Other |
| 631 |
- Revise CI scripts ([#632], [#635]) |
| 632 |
- Remove functionality already deprecated in 0.5 ([#499]) |
| 633 |
- 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]) |
| 634 |
|
| 635 |
[#466]: https://github.com/rust-random/rand/pull/466 |
| 636 |
[#477]: https://github.com/rust-random/rand/pull/477 |
| 637 |
[#479]: https://github.com/rust-random/rand/pull/479 |
| 638 |
[#483]: https://github.com/rust-random/rand/pull/483 |
| 639 |
[#485]: https://github.com/rust-random/rand/pull/485 |
| 640 |
[#491]: https://github.com/rust-random/rand/pull/491 |
| 641 |
[#499]: https://github.com/rust-random/rand/pull/499 |
| 642 |
[#500]: https://github.com/rust-random/rand/pull/500 |
| 643 |
[#506]: https://github.com/rust-random/rand/pull/506 |
| 644 |
[#515]: https://github.com/rust-random/rand/pull/515 |
| 645 |
[#518]: https://github.com/rust-random/rand/pull/518 |
| 646 |
[#519]: https://github.com/rust-random/rand/pull/519 |
| 647 |
[#523]: https://github.com/rust-random/rand/pull/523 |
| 648 |
[#541]: https://github.com/rust-random/rand/pull/541 |
| 649 |
[#542]: https://github.com/rust-random/rand/pull/542 |
| 650 |
[#544]: https://github.com/rust-random/rand/pull/544 |
| 651 |
[#547]: https://github.com/rust-random/rand/pull/547 |
| 652 |
[#551]: https://github.com/rust-random/rand/pull/551 |
| 653 |
[#557]: https://github.com/rust-random/rand/pull/557 |
| 654 |
[#559]: https://github.com/rust-random/rand/pull/559 |
| 655 |
[#561]: https://github.com/rust-random/rand/pull/561 |
| 656 |
[#562]: https://github.com/rust-random/rand/pull/562 |
| 657 |
[#566]: https://github.com/rust-random/rand/pull/566 |
| 658 |
[#567]: https://github.com/rust-random/rand/pull/567 |
| 659 |
[#571]: https://github.com/rust-random/rand/pull/571 |
| 660 |
[#574]: https://github.com/rust-random/rand/pull/574 |
| 661 |
[#575]: https://github.com/rust-random/rand/pull/575 |
| 662 |
[#576]: https://github.com/rust-random/rand/pull/576 |
| 663 |
[#578]: https://github.com/rust-random/rand/pull/578 |
| 664 |
[#583]: https://github.com/rust-random/rand/pull/583 |
| 665 |
[#591]: https://github.com/rust-random/rand/pull/591 |
| 666 |
[#593]: https://github.com/rust-random/rand/pull/593 |
| 667 |
[#600]: https://github.com/rust-random/rand/pull/600 |
| 668 |
[#607]: https://github.com/rust-random/rand/pull/607 |
| 669 |
[#609]: https://github.com/rust-random/rand/pull/609 |
| 670 |
[#611]: https://github.com/rust-random/rand/pull/611 |
| 671 |
[#615]: https://github.com/rust-random/rand/pull/615 |
| 672 |
[#620]: https://github.com/rust-random/rand/pull/620 |
| 673 |
[#623]: https://github.com/rust-random/rand/pull/623 |
| 674 |
[#629]: https://github.com/rust-random/rand/pull/629 |
| 675 |
[#630]: https://github.com/rust-random/rand/pull/630 |
| 676 |
[#632]: https://github.com/rust-random/rand/pull/632 |
| 677 |
[#635]: https://github.com/rust-random/rand/pull/635 |
| 678 |
[#636]: https://github.com/rust-random/rand/pull/636 |
| 679 |
[#642]: https://github.com/rust-random/rand/pull/642 |
| 680 |
[#643]: https://github.com/rust-random/rand/pull/643 |
| 681 |
[#647]: https://github.com/rust-random/rand/pull/647 |
| 682 |
[#649]: https://github.com/rust-random/rand/pull/649 |
| 683 |
[#657]: https://github.com/rust-random/rand/pull/657 |
| 684 |
[#660]: https://github.com/rust-random/rand/pull/660 |
| 685 |
[#662]: https://github.com/rust-random/rand/pull/662 |
| 686 |
[#664]: https://github.com/rust-random/rand/pull/664 |
| 687 |
[#668]: https://github.com/rust-random/rand/pull/668 |
| 688 |
[#671]: https://github.com/rust-random/rand/pull/671 |
| 689 |
[#674]: https://github.com/rust-random/rand/pull/674 |
| 690 |
[#675]: https://github.com/rust-random/rand/pull/675 |
| 691 |
[#685]: https://github.com/rust-random/rand/pull/685 |
| 692 |
[#686]: https://github.com/rust-random/rand/pull/686 |
| 693 |
[#691]: https://github.com/rust-random/rand/pull/691 |
| 694 |
[#696]: https://github.com/rust-random/rand/pull/696 |
| 695 |
[#703]: https://github.com/rust-random/rand/pull/703 |
| 696 |
[#711]: https://github.com/rust-random/rand/pull/711 |
| 697 |
|
| 698 |
## [0.5.5] - 2018-08-07 |
| 699 |
|
| 700 |
### Documentation |
| 701 |
- Fix links in documentation ([#582]) |
| 702 |
|
| 703 |
## [0.5.4] - 2018-07-11 |
| 704 |
|
| 705 |
### Platform support |
| 706 |
- Make `OsRng` work via WASM/stdweb for WebWorkers |
| 707 |
|
| 708 |
## [0.5.3] - 2018-06-26 |
| 709 |
|
| 710 |
### Platform support |
| 711 |
- OpenBSD, Bitrig: fix compilation (broken in 0.5.1) ([#530]) |
| 712 |
|
| 713 |
## [0.5.2] - 2018-06-18 |
| 714 |
|
| 715 |
### Platform support |
| 716 |
- Hide `OsRng` and `JitterRng` on unsupported platforms ([#512]; fixes [#503]) |
| 717 |
|
| 718 |
## [0.5.1] - 2018-06-08 |
| 719 |
|
| 720 |
### New distributions |
| 721 |
- Added Cauchy distribution. ([#474], [#486]) |
| 722 |
- Added Pareto distribution. ([#495]) |
| 723 |
|
| 724 |
### Platform support and `OsRng` |
| 725 |
- Remove blanket Unix implementation. ([#484]) |
| 726 |
- Remove Wasm unimplemented stub. ([#484]) |
| 727 |
- Dragonfly BSD: read from `/dev/random`. ([#484]) |
| 728 |
- Bitrig: use `getentropy` like OpenBSD. ([#484]) |
| 729 |
- Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. ([#484]) |
| 730 |
- Emscripten, `stdweb`: split the read up in chunks. ([#484]) |
| 731 |
- Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. ([#484]) |
| 732 |
- Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. ([#484]) |
| 733 |
- Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). ([#484]) |
| 734 |
|
| 735 |
## [0.5.0] - 2018-05-21 |
| 736 |
|
| 737 |
### Crate features and organisation |
| 738 |
- Minimum Rust version update: 1.22.0. ([#239]) |
| 739 |
- Create a separate `rand_core` crate. ([#288]) |
| 740 |
- Deprecate `rand_derive`. ([#256]) |
| 741 |
- Add `prelude` (and module reorganisation). ([#435]) |
| 742 |
- Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. ([#246]) |
| 743 |
- Add `serde1` feature for some PRNGs. ([#189]) |
| 744 |
- `stdweb` feature for `OsRng` support on WASM via stdweb. ([#272], [#336]) |
| 745 |
|
| 746 |
### `Rng` trait |
| 747 |
- Split `Rng` into `RngCore` and `Rng` extension trait. `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. ([#265]) |
| 748 |
- Add `Rng::sample`. ([#256]) |
| 749 |
- Deprecate `Rng::gen_weighted_bool`. ([#308]) |
| 750 |
- Add `Rng::gen_bool`. ([#308]) |
| 751 |
- Remove `Rng::next_f32` and `Rng::next_f64`. ([#273]) |
| 752 |
- Add optimized `Rng::fill` and `Rng::try_fill` methods. ([#247]) |
| 753 |
- Deprecate `Rng::gen_iter`. ([#286]) |
| 754 |
- Deprecate `Rng::gen_ascii_chars`. ([#279]) |
| 755 |
|
| 756 |
### `rand_core` crate |
| 757 |
- `rand` now depends on new `rand_core` crate ([#288]) |
| 758 |
- `RngCore` and `SeedableRng` are now part of `rand_core`. ([#288]) |
| 759 |
- Add modules to help implementing RNGs `impl` and `le`. ([#209], [#228]) |
| 760 |
- Add `Error` and `ErrorKind`. ([#225]) |
| 761 |
- Add `CryptoRng` marker trait. ([#273]) |
| 762 |
- Add `BlockRngCore` trait. ([#281]) |
| 763 |
- Add `BlockRng` and `BlockRng64` wrappers to help implementations. ([#281], [#325]) |
| 764 |
- Revise the `SeedableRng` trait. ([#233]) |
| 765 |
- Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. ([#288]) |
| 766 |
- Add `RngCore::try_fill_bytes`. ([#225]) |
| 767 |
|
| 768 |
### Other traits and types |
| 769 |
- Add `FromEntropy` trait. ([#233], [#375]) |
| 770 |
- Add `SmallRng` wrapper. ([#296]) |
| 771 |
- Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). ([#281]) |
| 772 |
- Deprecate `weak_rng`. Use `SmallRng` instead. ([#296]) |
| 773 |
- Deprecate `AsciiGenerator`. ([#279]) |
| 774 |
|
| 775 |
### Random number generators |
| 776 |
- Switch `StdRng` and `thread_rng` to HC-128. ([#277]) |
| 777 |
- `StdRng` must now be created with `from_entropy` instead of `new` |
| 778 |
- Change `thread_rng` reseeding threshold to 32 MiB. ([#277]) |
| 779 |
- PRNGs no longer implement `Copy`. ([#209]) |
| 780 |
- `Debug` implementations no longer show internals. ([#209]) |
| 781 |
- Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. ([#383], [#384]) |
| 782 |
- Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. ([#189]) |
| 783 |
- Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. ([#281]) |
| 784 |
- All PRNGs are now portable across big- and little-endian architectures. ([#209]) |
| 785 |
- `Isaac64Rng::next_u32` no longer throws away half the results. ([#209]) |
| 786 |
- Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. ([#209]) |
| 787 |
- Add the HC-128 CSPRNG `Hc128Rng`. ([#210]) |
| 788 |
- Change ChaCha20 to have 64-bit counter and 64-bit stream. ([#349]) |
| 789 |
- Changes to `JitterRng` to get its size down from 2112 to 24 bytes. ([#251]) |
| 790 |
- Various performance improvements to all PRNGs. |
| 791 |
|
| 792 |
### Platform support and `OsRng` |
| 793 |
- Add support for CloudABI. ([#224]) |
| 794 |
- Remove support for NaCl. ([#225]) |
| 795 |
- WASM support for `OsRng` via stdweb, behind the `stdweb` feature. ([#272], [#336]) |
| 796 |
- Use `getrandom` on more platforms for Linux, and on Android. ([#338]) |
| 797 |
- Use the `SecRandomCopyBytes` interface on macOS. ([#322]) |
| 798 |
- On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. ([#239]) |
| 799 |
- On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. ([#338]) |
| 800 |
- Better error handling and reporting in `OsRng` (using new error type). ([#225]) |
| 801 |
- `OsRng` now uses non-blocking when available. ([#225]) |
| 802 |
- Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. ([#235]) |
| 803 |
|
| 804 |
### Distributions |
| 805 |
- New `Distribution` trait. ([#256]) |
| 806 |
- Add `Distribution::sample_iter` and `Rng::::sample_iter`. ([#361]) |
| 807 |
- Deprecate `Rand`, `Sample` and `IndependentSample` traits. ([#256]) |
| 808 |
- Add a `Standard` distribution (replaces most `Rand` implementations). ([#256]) |
| 809 |
- Add `Binomial` and `Poisson` distributions. ([#96]) |
| 810 |
- Add `Bernoulli` dsitribution. ([#411]) |
| 811 |
- Add `Alphanumeric` distribution. ([#279]) |
| 812 |
- Remove `Closed01` distribution, add `OpenClosed01`. ([#274], [#420]) |
| 813 |
- Rework `Range` type, making it possible to implement it for user types. ([#274]) |
| 814 |
- Rename `Range` to `Uniform`. ([#395]) |
| 815 |
- Add `Uniform::new_inclusive` for inclusive ranges. ([#274]) |
| 816 |
- Use widening multiply method for much faster integer range reduction. ([#274]) |
| 817 |
- `Standard` distribution for `char` uses `Uniform` internally. ([#274]) |
| 818 |
- `Standard` distribution for `bool` uses sign test. ([#274]) |
| 819 |
- Implement `Standard` distribution for `Wrapping<T>`. ([#436]) |
| 820 |
- Implement `Uniform` distribution for `Duration`. ([#427]) |
| 821 |
|
| 822 |
[#96]: https://github.com/rust-random/rand/pull/96 |
| 823 |
[#189]: https://github.com/rust-random/rand/pull/189 |
| 824 |
[#209]: https://github.com/rust-random/rand/pull/209 |
| 825 |
[#210]: https://github.com/rust-random/rand/pull/210 |
| 826 |
[#224]: https://github.com/rust-random/rand/pull/224 |
| 827 |
[#225]: https://github.com/rust-random/rand/pull/225 |
| 828 |
[#228]: https://github.com/rust-random/rand/pull/228 |
| 829 |
[#233]: https://github.com/rust-random/rand/pull/233 |
| 830 |
[#235]: https://github.com/rust-random/rand/pull/235 |
| 831 |
[#239]: https://github.com/rust-random/rand/pull/239 |
| 832 |
[#246]: https://github.com/rust-random/rand/pull/246 |
| 833 |
[#247]: https://github.com/rust-random/rand/pull/247 |
| 834 |
[#251]: https://github.com/rust-random/rand/pull/251 |
| 835 |
[#256]: https://github.com/rust-random/rand/pull/256 |
| 836 |
[#265]: https://github.com/rust-random/rand/pull/265 |
| 837 |
[#272]: https://github.com/rust-random/rand/pull/272 |
| 838 |
[#273]: https://github.com/rust-random/rand/pull/273 |
| 839 |
[#274]: https://github.com/rust-random/rand/pull/274 |
| 840 |
[#277]: https://github.com/rust-random/rand/pull/277 |
| 841 |
[#279]: https://github.com/rust-random/rand/pull/279 |
| 842 |
[#281]: https://github.com/rust-random/rand/pull/281 |
| 843 |
[#286]: https://github.com/rust-random/rand/pull/286 |
| 844 |
[#288]: https://github.com/rust-random/rand/pull/288 |
| 845 |
[#296]: https://github.com/rust-random/rand/pull/296 |
| 846 |
[#308]: https://github.com/rust-random/rand/pull/308 |
| 847 |
[#322]: https://github.com/rust-random/rand/pull/322 |
| 848 |
[#325]: https://github.com/rust-random/rand/pull/325 |
| 849 |
[#336]: https://github.com/rust-random/rand/pull/336 |
| 850 |
[#338]: https://github.com/rust-random/rand/pull/338 |
| 851 |
[#349]: https://github.com/rust-random/rand/pull/349 |
| 852 |
[#361]: https://github.com/rust-random/rand/pull/361 |
| 853 |
[#375]: https://github.com/rust-random/rand/pull/375 |
| 854 |
[#383]: https://github.com/rust-random/rand/pull/383 |
| 855 |
[#384]: https://github.com/rust-random/rand/pull/384 |
| 856 |
[#395]: https://github.com/rust-random/rand/pull/395 |
| 857 |
[#411]: https://github.com/rust-random/rand/pull/411 |
| 858 |
[#420]: https://github.com/rust-random/rand/pull/420 |
| 859 |
[#427]: https://github.com/rust-random/rand/pull/427 |
| 860 |
[#435]: https://github.com/rust-random/rand/pull/435 |
| 861 |
[#436]: https://github.com/rust-random/rand/pull/436 |
| 862 |
[#474]: https://github.com/rust-random/rand/pull/474 |
| 863 |
[#484]: https://github.com/rust-random/rand/pull/484 |
| 864 |
[#486]: https://github.com/rust-random/rand/pull/486 |
| 865 |
[#495]: https://github.com/rust-random/rand/pull/495 |
| 866 |
[#503]: https://github.com/rust-random/rand/pull/503 |
| 867 |
[#512]: https://github.com/rust-random/rand/pull/512 |
| 868 |
[#530]: https://github.com/rust-random/rand/pull/530 |
| 869 |
[#582]: https://github.com/rust-random/rand/pull/582 |
| 870 |
## [0.4.6] - 2019-01-26 |
| 871 |
|
| 872 |
### Platforms |
| 873 |
- Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng |
| 874 |
|
| 875 |
## [0.4.5] - 2019-01-09 |
| 876 |
|
| 877 |
### Fixed |
| 878 |
- Remove dependency on default features of `rand_core` ([#689]) |
| 879 |
|
| 880 |
## [0.4.4] - 2019-01-08 |
| 881 |
|
| 882 |
Version yanked due to semver-breaking change ([#688]). |
| 883 |
|
| 884 |
### Added |
| 885 |
- SGX support |
| 886 |
|
| 887 |
## [0.4.3] - 2018-08-16 |
| 888 |
|
| 889 |
### Fixed |
| 890 |
- Use correct syscall number for PowerPC ([#589]) |
| 891 |
|
| 892 |
## [0.4.2] - 2018-01-06 |
| 893 |
|
| 894 |
### Changed |
| 895 |
- Use `winapi` on Windows |
| 896 |
- Update for Fuchsia OS |
| 897 |
- Remove dev-dependency on `log` |
| 898 |
|
| 899 |
## [0.4.1] - 2017-12-17 |
| 900 |
|
| 901 |
### Added |
| 902 |
- `no_std` support |
| 903 |
|
| 904 |
## [0.4.0-pre.0] - 2017-12-11 |
| 905 |
|
| 906 |
### Added |
| 907 |
- `JitterRng` added as a high-quality alternative entropy source using the system timer |
| 908 |
- new `seq` module with `sample_iter`, `sample_slice`, etc. |
| 909 |
- WASM support via dummy implementations (fail at run-time) |
| 910 |
- Additional benchmarks, covering generators and new seq code |
| 911 |
|
| 912 |
### Changed |
| 913 |
- `thread_rng` uses `JitterRng` if seeding from system time fails (slower but more secure than previous method) |
| 914 |
|
| 915 |
### Deprecated |
| 916 |
- `sample` function deprecated (replaced by `sample_iter`) |
| 917 |
|
| 918 |
[#589]: https://github.com/rust-random/rand/pull/589 |
| 919 |
[#688]: https://github.com/rust-random/rand/pull/688 |
| 920 |
[#689]: https://github.com/rust-random/rand/pull/689 |
| 921 |
|
| 922 |
## [0.3.22] - 2018-02-05 |
| 923 |
Code replaced with a compatibility layer over rand 0.4. |
| 924 |
|
| 925 |
## [0.3.20] - 2018-01-06 |
| 926 |
### Changed |
| 927 |
- Remove dev-dependency on `log` |
| 928 |
- Update `fuchsia-zircon` dependency to 0.3.2 |
| 929 |
|
| 930 |
|
| 931 |
## [0.3.19] - 2017-12-27 |
| 932 |
### Changed |
| 933 |
- Require `log <= 0.3.8` for dev builds |
| 934 |
- Update `fuchsia-zircon` dependency to 0.3 |
| 935 |
- Fix broken links in docs (to unblock compiler docs testing CI) |
| 936 |
|
| 937 |
|
| 938 |
## [0.3.18] - 2017-11-06 |
| 939 |
### Changed |
| 940 |
- `thread_rng` is seeded from the system time if `OsRng` fails |
| 941 |
- `weak_rng` now uses `thread_rng` internally |
| 942 |
|
| 943 |
|
| 944 |
## [0.3.17] - 2017-10-07 |
| 945 |
### Changed |
| 946 |
- Fuchsia: Magenta was renamed Zircon |
| 947 |
|
| 948 |
## [0.3.16] - 2017-07-27 |
| 949 |
### Added |
| 950 |
- Implement Debug for mote non-public types |
| 951 |
- implement `Rand` for (i|u)i128 |
| 952 |
- Support for Fuchsia |
| 953 |
|
| 954 |
### Changed |
| 955 |
- Add inline attribute to SampleRange::construct_range. |
| 956 |
This improves the benchmark for sample in 11% and for shuffle in 16%. |
| 957 |
- Use `RtlGenRandom` instead of `CryptGenRandom` |
| 958 |
|
| 959 |
|
| 960 |
## [0.3.15] - 2016-11-26 |
| 961 |
### Added |
| 962 |
- Add `Rng` trait method `choose_mut` |
| 963 |
- Redox support |
| 964 |
|
| 965 |
### Changed |
| 966 |
- Use `arc4rand` for `OsRng` on FreeBSD. |
| 967 |
- Use `arc4random(3)` for `OsRng` on OpenBSD. |
| 968 |
|
| 969 |
### Fixed |
| 970 |
- Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows |
| 971 |
|
| 972 |
|
| 973 |
## [0.3.14] - 2016-02-13 |
| 974 |
### Fixed |
| 975 |
- Inline definitions from winapi/advapi32, which decreases build times |
| 976 |
|
| 977 |
|
| 978 |
## [0.3.13] - 2016-01-09 |
| 979 |
### Fixed |
| 980 |
- Compatible with Rust 1.7.0-nightly (needed some extra type annotations) |
| 981 |
|
| 982 |
|
| 983 |
## [0.3.12] - 2015-11-09 |
| 984 |
### Changed |
| 985 |
- Replaced the methods in `next_f32` and `next_f64` with the technique described |
| 986 |
Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more |
| 987 |
uniform distribution. |
| 988 |
- Depend on libc 0.2 |
| 989 |
|
| 990 |
### Fixed |
| 991 |
- Fix iterator protocol issue in `rand::sample` |
| 992 |
|
| 993 |
|
| 994 |
## [0.3.11] - 2015-08-31 |
| 995 |
### Added |
| 996 |
- Implement `Rand` for arrays with n <= 32 |
| 997 |
|
| 998 |
|
| 999 |
## [0.3.10] - 2015-08-17 |
| 1000 |
### Added |
| 1001 |
- Support for NaCl platforms |
| 1002 |
|
| 1003 |
### Changed |
| 1004 |
- Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box<R>` where `R: ?Sized + Rng` |
| 1005 |
|
| 1006 |
|
| 1007 |
## [0.3.9] - 2015-06-18 |
| 1008 |
### Changed |
| 1009 |
- Use `winapi` for Windows API things |
| 1010 |
|
| 1011 |
### Fixed |
| 1012 |
- Fixed test on stable/nightly |
| 1013 |
- Fix `getrandom` syscall number for aarch64-unknown-linux-gnu |
| 1014 |
|
| 1015 |
|
| 1016 |
## [0.3.8] - 2015-04-23 |
| 1017 |
### Changed |
| 1018 |
- `log` is a dev dependency |
| 1019 |
|
| 1020 |
### Fixed |
| 1021 |
- Fix race condition of atomics in `is_getrandom_available` |
| 1022 |
|
| 1023 |
|
| 1024 |
## [0.3.7] - 2015-04-03 |
| 1025 |
### Fixed |
| 1026 |
- Derive Copy/Clone changes |
| 1027 |
|
| 1028 |
|
| 1029 |
## [0.3.6] - 2015-04-02 |
| 1030 |
### Changed |
| 1031 |
- Move to stable Rust! |
| 1032 |
|
| 1033 |
|
| 1034 |
## [0.3.5] - 2015-04-01 |
| 1035 |
### Fixed |
| 1036 |
- Compatible with Rust master |
| 1037 |
|
| 1038 |
|
| 1039 |
## [0.3.4] - 2015-03-31 |
| 1040 |
### Added |
| 1041 |
- Implement Clone for `Weighted` |
| 1042 |
|
| 1043 |
### Fixed |
| 1044 |
- Compatible with Rust master |
| 1045 |
|
| 1046 |
|
| 1047 |
## [0.3.3] - 2015-03-26 |
| 1048 |
### Fixed |
| 1049 |
- Fix compile on Windows |
| 1050 |
|
| 1051 |
|
| 1052 |
## [0.3.2] - 2015-03-26 |
| 1053 |
|
| 1054 |
|
| 1055 |
## [0.3.1] - 2015-03-26 |
| 1056 |
### Fixed |
| 1057 |
- Fix compile on Windows |
| 1058 |
|
| 1059 |
|
| 1060 |
## [0.3.0] - 2015-03-25 |
| 1061 |
### Changed |
| 1062 |
- Update to use log version 0.3.x |
| 1063 |
|
| 1064 |
|
| 1065 |
## [0.2.1] - 2015-03-22 |
| 1066 |
### Fixed |
| 1067 |
- Compatible with Rust master |
| 1068 |
- Fixed iOS compilation |
| 1069 |
|
| 1070 |
|
| 1071 |
## [0.2.0] - 2015-03-06 |
| 1072 |
### Fixed |
| 1073 |
- Compatible with Rust master (move from `old_io` to `std::io`) |
| 1074 |
|
| 1075 |
|
| 1076 |
## [0.1.4] - 2015-03-04 |
| 1077 |
### Fixed |
| 1078 |
- Compatible with Rust master (use wrapping ops) |
| 1079 |
|
| 1080 |
|
| 1081 |
## [0.1.3] - 2015-02-20 |
| 1082 |
### Fixed |
| 1083 |
- Compatible with Rust master |
| 1084 |
|
| 1085 |
### Removed |
| 1086 |
- Removed Copy implementations from RNGs |
| 1087 |
|
| 1088 |
|
| 1089 |
## [0.1.2] - 2015-02-03 |
| 1090 |
### Added |
| 1091 |
- Imported functionality from `std::rand`, including: |
| 1092 |
- `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()` |
| 1093 |
- `ReaderRng`: A wrapper around any Reader to treat it as an RNG. |
| 1094 |
- Imported documentation from `std::rand` |
| 1095 |
- Imported tests from `std::rand` |
| 1096 |
|
| 1097 |
|
| 1098 |
## 0.1.1 - 2015-02-03 |
| 1099 |
### Added |
| 1100 |
- Migrate to a cargo-compatible directory structure. |
| 1101 |
|
| 1102 |
### Fixed |
| 1103 |
- Do not use entropy during `gen_weighted_bool(1)` |
| 1104 |
|
| 1105 |
|
| 1106 |
## Rust 0.12.0 - 2014-10-09 |
| 1107 |
### Added |
| 1108 |
- Impl Rand for tuples of arity 11 and 12 |
| 1109 |
- Include ChaCha pseudorandom generator |
| 1110 |
- Add `next_f64` and `next_f32` to Rng |
| 1111 |
- Implement Clone for PRNGs |
| 1112 |
|
| 1113 |
### Changed |
| 1114 |
- Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a |
| 1115 |
runtime is removed from Rust). |
| 1116 |
|
| 1117 |
### Fixed |
| 1118 |
- Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by |
| 1119 |
informing the optimiser that indexing is never out-of-bounds. |
| 1120 |
|
| 1121 |
### Removed |
| 1122 |
- Removed the Deprecated `choose_option` |
| 1123 |
|
| 1124 |
|
| 1125 |
## Rust 0.11.0 - 2014-07-02 |
| 1126 |
### Added |
| 1127 |
- document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random` |
| 1128 |
- `Rng::gen_iter()` which will return an infinite stream of random values |
| 1129 |
- `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters |
| 1130 |
|
| 1131 |
### Changed |
| 1132 |
- Now only depends on libcore! |
| 1133 |
- Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()` |
| 1134 |
- Rename OSRng to OsRng |
| 1135 |
- The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`, |
| 1136 |
but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice |
| 1137 |
structure now has a lifetime associated with it. |
| 1138 |
- The `sample` method on `Rng` has been moved to a top-level function in the |
| 1139 |
`rand` module due to its dependence on `Vec`. |
| 1140 |
|
| 1141 |
### Removed |
| 1142 |
- `Rng::gen_vec()` was removed. Previous behavior can be regained with |
| 1143 |
`rng.gen_iter().take(n).collect()` |
| 1144 |
- `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with |
| 1145 |
`rng.gen_ascii_chars().take(n).collect()` |
| 1146 |
- {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all |
| 1147 |
relied on being able to use an OSRng for seeding, but this is no longer |
| 1148 |
available in librand (where these types are defined). To retain the same |
| 1149 |
functionality, these types now implement the `Rand` trait so they can be |
| 1150 |
generated with a random seed from another random number generator. This allows |
| 1151 |
the stdlib to use an OSRng to create seeded instances of these RNGs. |
| 1152 |
- Rand implementations for `Box<T>` and `@T` were removed. These seemed to be |
| 1153 |
pretty rare in the codebase, and it allows for librand to not depend on |
| 1154 |
liballoc. Additionally, other pointer types like Rc<T> and Arc<T> were not |
| 1155 |
supported. |
| 1156 |
- Remove a slew of old deprecated functions |
| 1157 |
|
| 1158 |
|
| 1159 |
## [Rust 0.10] - 2014-04-03 |
| 1160 |
### Changed |
| 1161 |
- replace `Rng.shuffle's` functionality with `.shuffle_mut` |
| 1162 |
- bubble up IO errors when creating an OSRng |
| 1163 |
|
| 1164 |
### Fixed |
| 1165 |
- Use `fill()` instead of `read()` |
| 1166 |
- Rewrite OsRng in Rust for windows |
| 1167 |
|
| 1168 |
## 0.10-pre - 2014-03-02 |
| 1169 |
### Added |
| 1170 |
- Separate `rand` out of the standard library |
| 1171 |
|
| 1172 |
[Unreleased]: https://github.com/rust-random/rand/compare/0.10.1...HEAD |
| 1173 |
[0.10.1]: https://github.com/rust-random/rand/compare/0.10.0...0.10.1 |
| 1174 |
[0.10.0]: https://github.com/rust-random/rand/compare/0.9.2...0.10.0 |
| 1175 |
[0.9.2]: https://github.com/rust-random/rand/compare/0.9.1...0.9.2 |
| 1176 |
[0.9.1]: https://github.com/rust-random/rand/compare/0.9.0...0.9.1 |
| 1177 |
[0.9.0]: https://github.com/rust-random/rand/compare/0.8.5...0.9.0 |
| 1178 |
[0.8.5]: https://github.com/rust-random/rand/compare/0.8.4...0.8.5 |
| 1179 |
[0.8.4]: https://github.com/rust-random/rand/compare/0.8.3...0.8.4 |
| 1180 |
[0.8.3]: https://github.com/rust-random/rand/compare/0.8.2...0.8.3 |
| 1181 |
[0.8.2]: https://github.com/rust-random/rand/compare/0.8.1...0.8.2 |
| 1182 |
[0.8.1]: https://github.com/rust-random/rand/compare/0.8.0...0.8.1 |
| 1183 |
[0.8.0]: https://github.com/rust-random/rand/compare/0.7.3...0.8.0 |
| 1184 |
[0.7.3]: https://github.com/rust-random/rand/compare/0.7.2...0.7.3 |
| 1185 |
[0.7.2]: https://github.com/rust-random/rand/compare/0.7.1...0.7.2 |
| 1186 |
[0.7.1]: https://github.com/rust-random/rand/compare/0.7.0...0.7.1 |
| 1187 |
[0.7.0]: https://github.com/rust-random/rand/compare/0.6.5...0.7.0 |
| 1188 |
[0.6.5]: https://github.com/rust-random/rand/compare/0.6.4...0.6.5 |
| 1189 |
[0.6.4]: https://github.com/rust-random/rand/compare/0.6.3...0.6.4 |
| 1190 |
[0.6.3]: https://github.com/rust-random/rand/compare/0.6.2...0.6.3 |
| 1191 |
[0.6.2]: https://github.com/rust-random/rand/compare/0.6.1...0.6.2 |
| 1192 |
[0.6.1]: https://github.com/rust-random/rand/compare/0.6.0...0.6.1 |
| 1193 |
[0.6.0]: https://github.com/rust-random/rand/compare/0.5.5...0.6.0 |
| 1194 |
[0.5.5]: https://github.com/rust-random/rand/compare/0.5.4...0.5.5 |
| 1195 |
[0.5.4]: https://github.com/rust-random/rand/compare/0.5.3...0.5.4 |
| 1196 |
[0.5.3]: https://github.com/rust-random/rand/compare/0.5.2...0.5.3 |
| 1197 |
[0.5.2]: https://github.com/rust-random/rand/compare/0.5.1...0.5.2 |
| 1198 |
[0.5.1]: https://github.com/rust-random/rand/compare/0.5.0...0.5.1 |
| 1199 |
[0.5.0]: https://github.com/rust-random/rand/compare/0.4.6...0.5.0 |
| 1200 |
[0.4.6]: https://github.com/rust-random/rand/compare/0.4.5...0.4.6 |
| 1201 |
[0.4.5]: https://github.com/rust-random/rand/compare/0.4.4...0.4.5 |
| 1202 |
[0.4.4]: https://github.com/rust-random/rand/compare/0.4.3...0.4.4 |
| 1203 |
[0.4.3]: https://github.com/rust-random/rand/compare/0.4.2...0.4.3 |
| 1204 |
[0.4.2]: https://github.com/rust-random/rand/compare/0.4.1...0.4.2 |
| 1205 |
[0.4.1]: https://github.com/rust-random/rand/compare/0.4.0-pre.0...0.4.1 |
| 1206 |
[0.4.0-pre.0]: https://github.com/rust-random/rand/compare/0.3.22...0.4.0-pre.0 |
| 1207 |
[0.3.22]: https://github.com/rust-random/rand/compare/0.3.20...0.3.22 |
| 1208 |
[0.3.20]: https://github.com/rust-random/rand/compare/0.3.19...0.3.20 |
| 1209 |
[0.3.19]: https://github.com/rust-random/rand/compare/0.3.18...0.3.19 |
| 1210 |
[0.3.18]: https://github.com/rust-random/rand/compare/0.3.17...0.3.18 |
| 1211 |
[0.3.17]: https://github.com/rust-random/rand/compare/0.3.16...0.3.17 |
| 1212 |
[0.3.16]: https://github.com/rust-random/rand/compare/0.3.15...0.3.16 |
| 1213 |
[0.3.15]: https://github.com/rust-random/rand/compare/0.3.14...0.3.15 |
| 1214 |
[0.3.14]: https://github.com/rust-random/rand/compare/0.3.13...0.3.14 |
| 1215 |
[0.3.13]: https://github.com/rust-random/rand/compare/0.3.12...0.3.13 |
| 1216 |
[0.3.12]: https://github.com/rust-random/rand/compare/0.3.11...0.3.12 |
| 1217 |
[0.3.11]: https://github.com/rust-random/rand/compare/0.3.10...0.3.11 |
| 1218 |
[0.3.10]: https://github.com/rust-random/rand/compare/0.3.9...0.3.10 |
| 1219 |
[0.3.9]: https://github.com/rust-random/rand/compare/0.3.8...0.3.9 |
| 1220 |
[0.3.8]: https://github.com/rust-random/rand/compare/0.3.7...0.3.8 |
| 1221 |
[0.3.7]: https://github.com/rust-random/rand/compare/0.3.6...0.3.7 |
| 1222 |
[0.3.6]: https://github.com/rust-random/rand/compare/0.3.5...0.3.6 |
| 1223 |
[0.3.5]: https://github.com/rust-random/rand/compare/0.3.4...0.3.5 |
| 1224 |
[0.3.4]: https://github.com/rust-random/rand/compare/0.3.3...0.3.4 |
| 1225 |
[0.3.3]: https://github.com/rust-random/rand/compare/0.3.2...0.3.3 |
| 1226 |
[0.3.2]: https://github.com/rust-random/rand/compare/0.3.1...0.3.2 |
| 1227 |
[0.3.1]: https://github.com/rust-random/rand/compare/0.3.0...0.3.1 |
| 1228 |
[0.3.0]: https://github.com/rust-random/rand/compare/0.2.1...0.3.0 |
| 1229 |
[0.2.1]: https://github.com/rust-random/rand/compare/0.2.0...0.2.1 |
| 1230 |
[0.2.0]: https://github.com/rust-random/rand/compare/0.1.4...0.2.0 |
| 1231 |
[0.1.3]: https://github.com/rust-random/rand/compare/0.1.3...0.1.4 |
| 1232 |
[0.1.3]: https://github.com/rust-random/rand/compare/0.1.2...0.1.3 |
| 1233 |
[0.1.2]: https://github.com/rust-random/rand/compare/0.1.1...0.1.2 |