From fd091b04316db9dc5fafadbd6bdbe60b127408a9 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Thu, 2 Jan 2020 08:32:06 -0800 Subject: Update nitrokey crate to 0.4.0 This change finally updates the version of the nitrokey crate that we consume to 0.4.0. Along with that we update rand_core, one of its dependencies, to 0.5.1. Further more we add cfg-if in version 0.1.10 and getrandom in version 0.1.13, both of which are now new (non-development) dependencies. Import subrepo nitrokey/:nitrokey at e81057037e9b4f370b64c0a030a725bc6bdfb870 Import subrepo cfg-if/:cfg-if at 4484a6faf816ff8058088ad857b0c6bb2f4b02b2 Import subrepo getrandom/:getrandom at d661aa7e1b8cc80b47dabe3d2135b3b47d2858af Import subrepo rand/:rand at d877ed528248b52d947e0484364a4e1ae59ca502 --- rand/rand_core/README.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'rand/rand_core/README.md') diff --git a/rand/rand_core/README.md b/rand/rand_core/README.md index dee6504..467e66f 100644 --- a/rand/rand_core/README.md +++ b/rand/rand_core/README.md @@ -6,7 +6,7 @@ [![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/) [![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_core) [![API](https://docs.rs/rand_core/badge.svg)](https://docs.rs/rand_core) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.22+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) +[![Minimum rustc version](https://img.shields.io/badge/rustc-1.32+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) Core traits and error types of the [rand] library, plus tools for implementing RNGs. @@ -25,7 +25,7 @@ Links: - [API documentation (master)](https://rust-random.github.io/rand/rand_core) - [API documentation (docs.rs)](https://docs.rs/rand_core) -- [Changelog](CHANGELOG.md) +- [Changelog](https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md) [rand]: https://crates.io/crates/rand @@ -40,17 +40,34 @@ The `rand_core` crate provides: The traits and error types are also available via `rand`. +## Versions + +The current version is: +``` +rand_core = "0.5.0" +``` + +Rand libs have inter-dependencies and make use of the +[semver trick](https://github.com/dtolnay/semver-trick/) in order to make traits +compatible across crate versions. (This is especially important for `RngCore` +and `SeedableRng`.) A few crate releases are thus compatibility shims, +depending on the *next* lib version (e.g. `rand_core` versions `0.2.2` and +`0.3.1`). This means, for example, that `rand_core_0_4_0::SeedableRng` and +`rand_core_0_3_0::SeedableRng` are distinct, incompatible traits, which can +cause build errors. Usually, running `cargo update` is enough to fix any issues. + ## Crate Features `rand_core` supports `no_std` and `alloc`-only configurations, as well as full `std` functionality. The differences between `no_std` and full `std` are small, -comprising `RngCore` support for `Box` types where `R: RngCore`, as well as +comprising `RngCore` support for `Box` types where `R: RngCore`, +`std::io::Read` support for types supporting `RngCore`, and extensions to the `Error` type's functionality. -Due to [rust-lang/cargo#1596](https://github.com/rust-lang/cargo/issues/1596), -`rand_core` is built without `std` support by default. Since features are -unioned across the whole dependency tree, any crate using `rand` with its -default features will also enable `std` support in `rand_core`. +The `std` feature is *not enabled by default*. This is primarily to avoid build +problems where one crate implicitly requires `rand_core` with `std` support and +another crate requires `rand` *without* `std` support. However, the `rand` crate +continues to enable `std` support by default, both for itself and `rand_core`. The `serde1` feature can be used to derive `Serialize` and `Deserialize` for RNG implementations that use the `BlockRng` or `BlockRng64` wrappers. -- cgit v1.2.3