Debian Codegraph @

debian/rust-vendor/rand-0.8.8/CHANGELOG.md

raw
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](rand_core/CHANGELOG.md).
8
9 You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.
10
11 ## [0.8.8] - 2026-08-25
12 ### Fixes
13 - Fix build for `--no-default-features --features serde1` ([#1825])
14
15 [#1825]: https://github.com/rust-random/rand/pull/1825
16
17 ## [0.8.7] - 2026-07-02
18 ### Fixes
19 - Fix possible memory safety violation due to deserialization of `UniformChar` from bad source ([#1804])
20
21 [#1804]: https://github.com/rust-random/rand/pull/1804
22
23 ## [0.8.6] - 2026-04-14
24 This release back-ports a fix from v0.10. See also [#1763].
25
26 ### Changes
27 - Deprecate feature `log` ([#1772])
28
29 [#1763]: https://github.com/rust-random/rand/pull/1763
30 [#1772]: https://github.com/rust-random/rand/pull/1772
31
32 - Drop the experimental `simd_support` feature.
33
34 ## [0.8.5] - 2021-08-20
35 ### Fixes
36 - Fix build on non-32/64-bit architectures (#1144)
37 - Fix "min_const_gen" feature for `no_std` (#1173)
38 - Check `libc::pthread_atfork` return value with panic on error (#1178)
39 - More robust reseeding in case `ReseedingRng` is used from a fork handler (#1178)
40 - Fix nightly: remove unused `slice_partition_at_index` feature (#1215)
41 - Fix nightly + `simd_support`: update `packed_simd` (#1216)
42
43 ### Rngs
44 - `StdRng`: Switch from HC128 to ChaCha12 on emscripten (#1142).
45 We now use ChaCha12 on all platforms.
46
47 ### Documentation
48 - Added docs about rand's use of const generics (#1150)
49 - Better random chars example (#1157)
50
51
52 ## [0.8.4] - 2021-06-15
53 ### Additions
54 - Use const-generics to support arrays of all sizes (#1104)
55 - Implement `Clone` and `Copy` for `Alphanumeric` (#1126)
56 - Add `Distribution::map` to derive a distribution using a closure (#1129)
57 - Add `Slice` distribution (#1107)
58 - Add `DistString` trait with impls for `Standard` and `Alphanumeric` (#1133)
59
60 ### Other
61 - Reorder asserts in `Uniform` float distributions for easier debugging of non-finite arguments
62 (#1094, #1108)
63 - Add range overflow check in `Uniform` float distributions (#1108)
64 - Deprecate `rngs::adapter::ReadRng` (#1130)
65
66 ## [0.8.3] - 2021-01-25
67 ### Fixes
68 - Fix `no-std` + `alloc` build by gating `choose_multiple_weighted` on `std` (#1088)
69
70 ## [0.8.2] - 2021-01-12
71 ### Fixes
72 - Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when
73 providing a full integer range (eg `0..=MAX`) (#1087)
74
75 ## [0.8.1] - 2020-12-31
76 ### Other
77 - Enable all stable features in the playground (#1081)
78
79 ## [0.8.0] - 2020-12-18
80 ### Platform support
81 - The minimum supported Rust version is now 1.36 (#1011)
82 - `getrandom` updated to v0.2 (#1041)
83 - Remove `wasm-bindgen` and `stdweb` feature flags. For details of WASM support,
84 see the [getrandom documentation](https://docs.rs/getrandom/latest). (#948)
85 - `ReadRng::next_u32` and `next_u64` now use little-Endian conversion instead
86 of native-Endian, affecting results on Big-Endian platforms (#1061)
87 - The `nightly` feature no longer implies the `simd_support` feature (#1048)
88 - Fix `simd_support` feature to work on current nightlies (#1056)
89
90 ### Rngs
91 - `ThreadRng` is no longer `Copy` to enable safe usage within thread-local destructors (#1035)
92 - `gen_range(a, b)` was replaced with `gen_range(a..b)`. `gen_range(a..=b)` is
93 also supported. Note that `a` and `b` can no longer be references or SIMD types. (#744, #1003)
94 - Replace `AsByteSliceMut` with `Fill` and add support for `[bool], [char], [f32], [f64]` (#940)
95 - Restrict `rand::rngs::adapter` to `std` (#1027; see also #928)
96 - `StdRng`: add new `std_rng` feature flag (enabled by default, but might need
97 to be used if disabling default crate features) (#948)
98 - `StdRng`: Switch from ChaCha20 to ChaCha12 for better performance (#1028)
99 - `SmallRng`: Replace PCG algorithm with xoshiro{128,256}++ (#1038)
100
101 ### Sequences
102 - Add `IteratorRandom::choose_stable` as an alternative to `choose` which does
103 not depend on size hints (#1057)
104 - Improve accuracy and performance of `IteratorRandom::choose` (#1059)
105 - Implement `IntoIterator` for `IndexVec`, replacing the `into_iter` method (#1007)
106 - Add value stability tests for `seq` module (#933)
107
108 ### Misc
109 - Support `PartialEq` and `Eq` for `StdRng`, `SmallRng` and `StepRng` (#979)
110 - Added a `serde1` feature and added Serialize/Deserialize to `UniformInt` and `WeightedIndex` (#974)
111 - Drop some unsafe code (#962, #963, #1011)
112 - Reduce packaged crate size (#983)
113 - Migrate to GitHub Actions from Travis+AppVeyor (#1073)
114
115 ### Distributions
116 - `Alphanumeric` samples bytes instead of chars (#935)
117 - `Uniform` now supports `char`, enabling `rng.gen_range('A'..='Z')` (#1068)
118 - Add `UniformSampler::sample_single_inclusive` (#1003)
119
120 #### Weighted sampling
121 - Implement weighted sampling without replacement (#976, #1013)
122 - `rand::distributions::alias_method::WeightedIndex` was moved to `rand_distr::WeightedAliasIndex`.
123 The simpler alternative `rand::distribution::WeightedIndex` remains. (#945)
124 - Improve treatment of rounding errors in `WeightedIndex::update_weights` (#956)
125 - `WeightedIndex`: return error on NaN instead of panic (#1005)
126
127 ### Documentation
128 - Document types supported by `random` (#994)
129 - Document notes on password generation (#995)
130 - Note that `SmallRng` may not be the best choice for performance and in some
131 other cases (#1038)
132 - Use `doc(cfg)` to annotate feature-gated items (#1019)
133 - Adjust README (#1065)
134
135 ## [0.7.3] - 2020-01-10
136 ### Fixes
137 - The `Bernoulli` distribution constructors now reports an error on NaN and on
138 `denominator == 0`. (#925)
139 - Use `std::sync::Once` to register fork handler, avoiding possible atomicity violation (#928)
140 - Fix documentation on the precision of generated floating-point values
141
142 ### Changes
143 - Unix: make libc dependency optional; only use fork protection with std feature (#928)
144
145 ### Additions
146 - Implement `std::error::Error` for `BernoulliError` (#919)
147
148 ## [0.7.2] - 2019-09-16
149 ### Fixes
150 - Fix dependency on `rand_core` 0.5.1 (#890)
151
152 ### Additions
153 - Unit tests for value stability of distributions added (#888)
154
155 ## [0.7.1] - 2019-09-13
156 ### Yanked
157 This release was yanked since it depends on `rand_core::OsRng` added in 0.5.1
158 but specifies a dependency on version 0.5.0 (#890), causing a broken builds
159 when updating from `rand 0.7.0` without also updating `rand_core`.
160
161 ### Fixes
162 - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature (#844)
163 - `alloc` feature in `no_std` is available since Rust 1.36 (#856)
164 - Fix or squelch issues from Clippy lints (#840)
165
166 ### Additions
167 - Add a `no_std` target to CI to continuously evaluate `no_std` status (#844)
168 - `WeightedIndex`: allow adjusting a sub-set of weights (#866)
169
170 ## [0.7.0] - 2019-06-28
171
172 ### Fixes
173 - Fix incorrect pointer usages revealed by Miri testing (#780, #781)
174 - Fix (tiny!) bias in `Uniform` for 8- and 16-bit ints (#809)
175
176 ### Crate
177 - Bumped MSRV (min supported Rust version) to 1.32.0
178 - Updated to Rust Edition 2018 (#823, #824)
179 - Removed dependence on `rand_xorshift`, `rand_isaac`, `rand_jitter` crates (#759, #765)
180 - Remove dependency on `winapi` (#724)
181 - Removed all `build.rs` files (#824)
182 - Removed code already deprecated in version 0.6 (#757)
183 - Removed the serde1 feature (It's still available for backwards compatibility, but it does not do anything. #830)
184 - Many documentation changes
185
186 ### rand_core
187 - Updated to `rand_core` 0.5.0
188 - `Error` type redesigned with new API (#800)
189 - Move `from_entropy` method to `SeedableRng` and remove `FromEntropy` (#800)
190 - `SeedableRng::from_rng` is now expected to be value-stable (#815)
191
192 ### Standard RNGs
193 - OS interface moved from `rand_os` to new `getrandom` crate (#765, [getrandom](https://github.com/rust-random/getrandom))
194 - Use ChaCha for `StdRng` and `ThreadRng` (#792)
195 - Feature-gate `SmallRng` (#792)
196 - `ThreadRng` now supports `Copy` (#758)
197 - Deprecated `EntropyRng` (#765)
198 - Enable fork protection of ReseedingRng without `std` (#724)
199
200 ### Distributions
201 - Many distributions have been moved to `rand_distr` (#761)
202 - `Bernoulli::new` constructor now returns a `Result` (#803)
203 - `Distribution::sample_iter` adjusted for more flexibility (#758)
204 - Added `distributions::weighted::alias_method::WeightedIndex` for `O(1)` sampling (#692)
205 - Support sampling `NonZeroU*` types with the `Standard` distribution (#728)
206 - Optimised `Binomial` distribution sampling (#735, #740, #752)
207 - Optimised SIMD float sampling (#739)
208
209 ### Sequences
210 - Make results portable across 32- and 64-bit by using `u32` samples for `usize` where possible (#809)
211
212 ## [0.6.5] - 2019-01-28
213 ### Crates
214 - Update `rand_core` to 0.4 (#703)
215 - Move `JitterRng` to its own crate (#685)
216 - Add a wasm-bindgen test crate (#696)
217
218 ### Platforms
219 - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng
220
221 ### Doc
222 - Use RFC 1946 for doc links (#691)
223 - Fix some doc links and notes (#711)
224
225 ## [0.6.4] - 2019-01-08
226 ### Fixes
227 - Move wasm-bindgen shims to correct crate (#686)
228 - Make `wasm32-unknown-unknown` compile but fail at run-time if missing bindingsg (#686)
229
230 ## [0.6.3] - 2019-01-04
231 ### Fixes
232 - Make the `std` feature require the optional `rand_os` dependency (#675)
233 - Re-export the optional WASM dependencies of `rand_os` from `rand` to avoid breakage (#674)
234
235 ## [0.6.2] - 2019-01-04
236 ### Additions
237 - Add `Default` for `ThreadRng` (#657)
238 - Move `rngs::OsRng` to `rand_os` sub-crate; clean up code; use as dependency (#643) ##BLOCKER##
239 - Add `rand_xoshiro` sub-crate, plus benchmarks (#642, #668)
240
241 ### Fixes
242 - Fix bias in `UniformInt::sample_single` (#662)
243 - Use `autocfg` instead of `rustc_version` for rustc version detection (#664)
244 - Disable `i128` and `u128` if the `target_os` is `emscripten` (#671: work-around Emscripten limitation)
245 - CI fixes (#660, #671)
246
247 ### Optimisations
248 - Optimise memory usage of `UnitCircle` and `UnitSphereSurface` distributions (no PR)
249
250 ## [0.6.1] - 2018-11-22
251 - Support sampling `Duration` also for `no_std` (only since Rust 1.25) (#649)
252 - Disable default features of `libc` (#647)
253
254 ## [0.6.0] - 2018-11-14
255
256 ### Project organisation
257 - Rand has moved from [rust-lang-nursery](https://github.com/rust-lang-nursery/rand)
258 to [rust-random](https://github.com/rust-random/rand)! (#578)
259 - Created [The Rust Random Book](https://rust-random.github.io/book/)
260 ([source](https://github.com/rust-random/book))
261 - Update copyright and licence notices (#591, #611)
262 - Migrate policy documentation from the wiki (#544)
263
264 ### Platforms
265 - Add fork protection on Unix (#466)
266 - Added support for wasm-bindgen. (#541, #559, #562, #600)
267 - Enable `OsRng` for powerpc64, sparc and sparc64 (#609)
268 - Use `syscall` from `libc` on Linux instead of redefining it (#629)
269
270 ### RNGs
271 - Switch `SmallRng` to use PCG (#623)
272 - Implement `Pcg32` and `Pcg64Mcg` generators (#632)
273 - Move ISAAC RNGs to a dedicated crate (#551)
274 - Move Xorshift RNG to its own crate (#557)
275 - Move ChaCha and HC128 RNGs to dedicated crates (#607, #636)
276 - Remove usage of `Rc` from `ThreadRng` (#615)
277
278 ### Sampling and distributions
279 - Implement `Rng.gen_ratio()` and `Bernoulli::new_ratio()` (#491)
280 - Make `Uniform` strictly respect `f32` / `f64` high/low bounds (#477)
281 - Allow `gen_range` and `Uniform` to work on non-`Copy` types (#506)
282 - `Uniform` supports inclusive ranges: `Uniform::from(a..=b)`. This is
283 automatically enabled for Rust >= 1.27. (#566)
284 - Implement `TrustedLen` and `FusedIterator` for `DistIter` (#620)
285
286 #### New distributions
287 - Add the `Dirichlet` distribution (#485)
288 - Added sampling from the unit sphere and circle. (#567)
289 - Implement the triangular distribution (#575)
290 - Implement the Weibull distribution (#576)
291 - Implement the Beta distribution (#574)
292
293 #### Optimisations
294
295 - Optimise `Bernoulli::new` (#500)
296 - Optimise `char` sampling (#519)
297 - Optimise sampling of `std::time::Duration` (#583)
298
299 ### Sequences
300 - Redesign the `seq` module (#483, #515)
301 - Add `WeightedIndex` and `choose_weighted` (#518, #547)
302 - Optimised and changed return type of the `sample_indices` function. (#479)
303 - Use `Iterator::size_hint()` to speed up `IteratorRandom::choose` (#593)
304
305 ### SIMD
306 - Support for generating SIMD types (#523, #542, #561, #630)
307
308 ### Other
309 - Revise CI scripts (#632, #635)
310 - Remove functionality already deprecated in 0.5 (#499)
311 - Support for `i128` and `u128` is automatically enabled for Rust >= 1.26. This
312 renders the `i128_support` feature obsolete. It still exists for backwards
313 compatibility but does not have any effect. This breaks programs using Rand
314 with `i128_support` on nightlies older than Rust 1.26. (#571)
315
316
317 ## [0.5.5] - 2018-08-07
318 ### Documentation
319 - Fix links in documentation (#582)
320
321
322 ## [0.5.4] - 2018-07-11
323 ### Platform support
324 - Make `OsRng` work via WASM/stdweb for WebWorkers
325
326
327 ## [0.5.3] - 2018-06-26
328 ### Platform support
329 - OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530)
330
331
332 ## [0.5.2] - 2018-06-18
333 ### Platform support
334 - Hide `OsRng` and `JitterRng` on unsupported platforms (#512; fixes #503).
335
336
337 ## [0.5.1] - 2018-06-08
338
339 ### New distributions
340 - Added Cauchy distribution. (#474, #486)
341 - Added Pareto distribution. (#495)
342
343 ### Platform support and `OsRng`
344 - Remove blanket Unix implementation. (#484)
345 - Remove Wasm unimplemented stub. (#484)
346 - Dragonfly BSD: read from `/dev/random`. (#484)
347 - Bitrig: use `getentropy` like OpenBSD. (#484)
348 - Solaris: (untested) use `getrandom` if available, otherwise `/dev/random`. (#484)
349 - Emscripten, `stdweb`: split the read up in chunks. (#484)
350 - Emscripten, Haiku: don't do an extra blocking read from `/dev/random`. (#484)
351 - Linux, NetBSD, Solaris: read in blocking mode on first use in `fill_bytes`. (#484)
352 - Fuchsia, CloudABI: fix compilation (broken in Rand 0.5). (#484)
353
354
355 ## [0.5.0] - 2018-05-21
356
357 ### Crate features and organisation
358 - Minimum Rust version update: 1.22.0. (#239)
359 - Create a separate `rand_core` crate. (#288)
360 - Deprecate `rand_derive`. (#256)
361 - Add `prelude` (and module reorganisation). (#435)
362 - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246)
363 - Add `serde1` feature for some PRNGs. (#189)
364 - `stdweb` feature for `OsRng` support on WASM via stdweb. (#272, #336)
365
366 ### `Rng` trait
367 - Split `Rng` in `RngCore` and `Rng` extension trait.
368 `next_u32`, `next_u64` and `fill_bytes` are now part of `RngCore`. (#265)
369 - Add `Rng::sample`. (#256)
370 - Deprecate `Rng::gen_weighted_bool`. (#308)
371 - Add `Rng::gen_bool`. (#308)
372 - Remove `Rng::next_f32` and `Rng::next_f64`. (#273)
373 - Add optimized `Rng::fill` and `Rng::try_fill` methods. (#247)
374 - Deprecate `Rng::gen_iter`. (#286)
375 - Deprecate `Rng::gen_ascii_chars`. (#279)
376
377 ### `rand_core` crate
378 - `rand` now depends on new `rand_core` crate (#288)
379 - `RngCore` and `SeedableRng` are now part of `rand_core`. (#288)
380 - Add modules to help implementing RNGs `impl` and `le`. (#209, #228)
381 - Add `Error` and `ErrorKind`. (#225)
382 - Add `CryptoRng` marker trait. (#273)
383 - Add `BlockRngCore` trait. (#281)
384 - Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, #325)
385 - Revise the `SeedableRng` trait. (#233)
386 - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288)
387 - Add `RngCore::try_fill_bytes`. (#225)
388
389 ### Other traits and types
390 - Add `FromEntropy` trait. (#233, #375)
391 - Add `SmallRng` wrapper. (#296)
392 - Rewrite `ReseedingRng` to only work with `BlockRngCore` (substantial performance improvement). (#281)
393 - Deprecate `weak_rng`. Use `SmallRng` instead. (#296)
394 - Deprecate `AsciiGenerator`. (#279)
395
396 ### Random number generators
397 - Switch `StdRng` and `thread_rng` to HC-128. (#277)
398 - `StdRng` must now be created with `from_entropy` instead of `new`
399 - Change `thread_rng` reseeding threshold to 32 MiB. (#277)
400 - PRNGs no longer implement `Copy`. (#209)
401 - `Debug` implementations no longer show internals. (#209)
402 - Implement `Clone` for `ReseedingRng`, `JitterRng`, OsRng`. (#383, #384)
403 - Implement serialization for `XorShiftRng`, `IsaacRng` and `Isaac64Rng` under the `serde1` feature. (#189)
404 - Implement `BlockRngCore` for `ChaChaCore` and `Hc128Core`. (#281)
405 - All PRNGs are now portable across big- and little-endian architectures. (#209)
406 - `Isaac64Rng::next_u32` no longer throws away half the results. (#209)
407 - Add `IsaacRng::new_from_u64` and `Isaac64Rng::new_from_u64`. (#209)
408 - Add the HC-128 CSPRNG `Hc128Rng`. (#210)
409 - Change ChaCha20 to have 64-bit counter and 64-bit stream. (#349)
410 - Changes to `JitterRng` to get its size down from 2112 to 24 bytes. (#251)
411 - Various performance improvements to all PRNGs.
412
413 ### Platform support and `OsRng`
414 - Add support for CloudABI. (#224)
415 - Remove support for NaCl. (#225)
416 - WASM support for `OsRng` via stdweb, behind the `stdweb` feature. (#272, #336)
417 - Use `getrandom` on more platforms for Linux, and on Android. (#338)
418 - Use the `SecRandomCopyBytes` interface on macOS. (#322)
419 - On systems that do not have a syscall interface, only keep a single file descriptor open for `OsRng`. (#239)
420 - On Unix, first try a single read from `/dev/random`, then `/dev/urandom`. (#338)
421 - Better error handling and reporting in `OsRng` (using new error type). (#225)
422 - `OsRng` now uses non-blocking when available. (#225)
423 - Add `EntropyRng`, which provides `OsRng`, but has `JitterRng` as a fallback. (#235)
424
425 ### Distributions
426 - New `Distribution` trait. (#256)
427 - Add `Distribution::sample_iter` and `Rng::::sample_iter`. (#361)
428 - Deprecate `Rand`, `Sample` and `IndependentSample` traits. (#256)
429 - Add a `Standard` distribution (replaces most `Rand` implementations). (#256)
430 - Add `Binomial` and `Poisson` distributions. (#96)
431 - Add `Bernoulli` dsitribution. (#411)
432 - Add `Alphanumeric` distribution. (#279)
433 - Remove `Closed01` distribution, add `OpenClosed01`. (#274, #420)
434 - Rework `Range` type, making it possible to implement it for user types. (#274)
435 - Rename `Range` to `Uniform`. (#395)
436 - Add `Uniform::new_inclusive` for inclusive ranges. (#274)
437 - Use widening multiply method for much faster integer range reduction. (#274)
438 - `Standard` distribution for `char` uses `Uniform` internally. (#274)
439 - `Standard` distribution for `bool` uses sign test. (#274)
440 - Implement `Standard` distribution for `Wrapping<T>`. (#436)
441 - Implement `Uniform` distribution for `Duration`. (#427)
442
443
444 ## [0.4.3] - 2018-08-16
445 ### Fixed
446 - Use correct syscall number for PowerPC (#589)
447
448
449 ## [0.4.2] - 2018-01-06
450 ### Changed
451 - Use `winapi` on Windows
452 - Update for Fuchsia OS
453 - Remove dev-dependency on `log`
454
455
456 ## [0.4.1] - 2017-12-17
457 ### Added
458 - `no_std` support
459
460
461 ## [0.4.0-pre.0] - 2017-12-11
462 ### Added
463 - `JitterRng` added as a high-quality alternative entropy source using the
464 system timer
465 - new `seq` module with `sample_iter`, `sample_slice`, etc.
466 - WASM support via dummy implementations (fail at run-time)
467 - Additional benchmarks, covering generators and new seq code
468
469 ### Changed
470 - `thread_rng` uses `JitterRng` if seeding from system time fails
471 (slower but more secure than previous method)
472
473 ### Deprecated
474 - `sample` function deprecated (replaced by `sample_iter`)
475
476
477 ## [0.3.20] - 2018-01-06
478 ### Changed
479 - Remove dev-dependency on `log`
480 - Update `fuchsia-zircon` dependency to 0.3.2
481
482
483 ## [0.3.19] - 2017-12-27
484 ### Changed
485 - Require `log <= 0.3.8` for dev builds
486 - Update `fuchsia-zircon` dependency to 0.3
487 - Fix broken links in docs (to unblock compiler docs testing CI)
488
489
490 ## [0.3.18] - 2017-11-06
491 ### Changed
492 - `thread_rng` is seeded from the system time if `OsRng` fails
493 - `weak_rng` now uses `thread_rng` internally
494
495
496 ## [0.3.17] - 2017-10-07
497 ### Changed
498 - Fuchsia: Magenta was renamed Zircon
499
500 ## [0.3.16] - 2017-07-27
501 ### Added
502 - Implement Debug for mote non-public types
503 - implement `Rand` for (i|u)i128
504 - Support for Fuchsia
505
506 ### Changed
507 - Add inline attribute to SampleRange::construct_range.
508 This improves the benchmark for sample in 11% and for shuffle in 16%.
509 - Use `RtlGenRandom` instead of `CryptGenRandom`
510
511
512 ## [0.3.15] - 2016-11-26
513 ### Added
514 - Add `Rng` trait method `choose_mut`
515 - Redox support
516
517 ### Changed
518 - Use `arc4rand` for `OsRng` on FreeBSD.
519 - Use `arc4random(3)` for `OsRng` on OpenBSD.
520
521 ### Fixed
522 - Fix filling buffers 4 GiB or larger with `OsRng::fill_bytes` on Windows
523
524
525 ## [0.3.14] - 2016-02-13
526 ### Fixed
527 - Inline definitions from winapi/advapi32, which decreases build times
528
529
530 ## [0.3.13] - 2016-01-09
531 ### Fixed
532 - Compatible with Rust 1.7.0-nightly (needed some extra type annotations)
533
534
535 ## [0.3.12] - 2015-11-09
536 ### Changed
537 - Replaced the methods in `next_f32` and `next_f64` with the technique described
538 Saito & Matsumoto at MCQMC'08. The new method should exhibit a slightly more
539 uniform distribution.
540 - Depend on libc 0.2
541
542 ### Fixed
543 - Fix iterator protocol issue in `rand::sample`
544
545
546 ## [0.3.11] - 2015-08-31
547 ### Added
548 - Implement `Rand` for arrays with n <= 32
549
550
551 ## [0.3.10] - 2015-08-17
552 ### Added
553 - Support for NaCl platforms
554
555 ### Changed
556 - Allow `Rng` to be `?Sized`, impl for `&mut R` and `Box<R>` where `R: ?Sized + Rng`
557
558
559 ## [0.3.9] - 2015-06-18
560 ### Changed
561 - Use `winapi` for Windows API things
562
563 ### Fixed
564 - Fixed test on stable/nightly
565 - Fix `getrandom` syscall number for aarch64-unknown-linux-gnu
566
567
568 ## [0.3.8] - 2015-04-23
569 ### Changed
570 - `log` is a dev dependency
571
572 ### Fixed
573 - Fix race condition of atomics in `is_getrandom_available`
574
575
576 ## [0.3.7] - 2015-04-03
577 ### Fixed
578 - Derive Copy/Clone changes
579
580
581 ## [0.3.6] - 2015-04-02
582 ### Changed
583 - Move to stable Rust!
584
585
586 ## [0.3.5] - 2015-04-01
587 ### Fixed
588 - Compatible with Rust master
589
590
591 ## [0.3.4] - 2015-03-31
592 ### Added
593 - Implement Clone for `Weighted`
594
595 ### Fixed
596 - Compatible with Rust master
597
598
599 ## [0.3.3] - 2015-03-26
600 ### Fixed
601 - Fix compile on Windows
602
603
604 ## [0.3.2] - 2015-03-26
605
606
607 ## [0.3.1] - 2015-03-26
608 ### Fixed
609 - Fix compile on Windows
610
611
612 ## [0.3.0] - 2015-03-25
613 ### Changed
614 - Update to use log version 0.3.x
615
616
617 ## [0.2.1] - 2015-03-22
618 ### Fixed
619 - Compatible with Rust master
620 - Fixed iOS compilation
621
622
623 ## [0.2.0] - 2015-03-06
624 ### Fixed
625 - Compatible with Rust master (move from `old_io` to `std::io`)
626
627
628 ## [0.1.4] - 2015-03-04
629 ### Fixed
630 - Compatible with Rust master (use wrapping ops)
631
632
633 ## [0.1.3] - 2015-02-20
634 ### Fixed
635 - Compatible with Rust master
636
637 ### Removed
638 - Removed Copy implementations from RNGs
639
640
641 ## [0.1.2] - 2015-02-03
642 ### Added
643 - Imported functionality from `std::rand`, including:
644 - `StdRng`, `SeedableRng`, `TreadRng`, `weak_rng()`
645 - `ReaderRng`: A wrapper around any Reader to treat it as an RNG.
646 - Imported documentation from `std::rand`
647 - Imported tests from `std::rand`
648
649
650 ## [0.1.1] - 2015-02-03
651 ### Added
652 - Migrate to a cargo-compatible directory structure.
653
654 ### Fixed
655 - Do not use entropy during `gen_weighted_bool(1)`
656
657
658 ## [Rust 0.12.0] - 2014-10-09
659 ### Added
660 - Impl Rand for tuples of arity 11 and 12
661 - Include ChaCha pseudorandom generator
662 - Add `next_f64` and `next_f32` to Rng
663 - Implement Clone for PRNGs
664
665 ### Changed
666 - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a
667 runtime is removed from Rust).
668
669 ### Fixed
670 - Improved performance of ISAAC and ISAAC64 by 30% and 12 % respectively, by
671 informing the optimiser that indexing is never out-of-bounds.
672
673 ### Removed
674 - Removed the Deprecated `choose_option`
675
676
677 ## [Rust 0.11.0] - 2014-07-02
678 ### Added
679 - document when to use `OSRng` in cryptographic context, and explain why we use `/dev/urandom` instead of `/dev/random`
680 - `Rng::gen_iter()` which will return an infinite stream of random values
681 - `Rng::gen_ascii_chars()` which will return an infinite stream of random ascii characters
682
683 ### Changed
684 - Now only depends on libcore!
685 - Remove `Rng.choose()`, rename `Rng.choose_option()` to `.choose()`
686 - Rename OSRng to OsRng
687 - The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`,
688 but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice
689 structure now has a lifetime associated with it.
690 - The `sample` method on `Rng` has been moved to a top-level function in the
691 `rand` module due to its dependence on `Vec`.
692
693 ### Removed
694 - `Rng::gen_vec()` was removed. Previous behavior can be regained with
695 `rng.gen_iter().take(n).collect()`
696 - `Rng::gen_ascii_str()` was removed. Previous behavior can be regained with
697 `rng.gen_ascii_chars().take(n).collect()`
698 - {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all
699 relied on being able to use an OSRng for seeding, but this is no longer
700 available in librand (where these types are defined). To retain the same
701 functionality, these types now implement the `Rand` trait so they can be
702 generated with a random seed from another random number generator. This allows
703 the stdlib to use an OSRng to create seeded instances of these RNGs.
704 - Rand implementations for `Box<T>` and `@T` were removed. These seemed to be
705 pretty rare in the codebase, and it allows for librand to not depend on
706 liballoc. Additionally, other pointer types like Rc<T> and Arc<T> were not
707 supported.
708 - Remove a slew of old deprecated functions
709
710
711 ## [Rust 0.10] - 2014-04-03
712 ### Changed
713 - replace `Rng.shuffle's` functionality with `.shuffle_mut`
714 - bubble up IO errors when creating an OSRng
715
716 ### Fixed
717 - Use `fill()` instead of `read()`
718 - Rewrite OsRng in Rust for windows
719
720 ## [0.10-pre] - 2014-03-02
721 ### Added
722 - Separate `rand` out of the standard library