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