From 0e626c74366d3622120231ebf6451509051a4435 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Mon, 25 Mar 2024 14:56:17 +0000 Subject: [PATCH] Cleaner README, remove MSRV shields (#1417) --- README.md | 49 +++++++++---------------------------------- rand_chacha/README.md | 1 - rand_core/README.md | 1 - rand_distr/README.md | 1 - rand_pcg/README.md | 1 - 5 files changed, 10 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index e6430e8377..ab080dfc05 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![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) [![API](https://docs.rs/rand/badge.svg)](https://docs.rs/rand) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) A Rust library for random number generation, featuring: @@ -56,49 +55,15 @@ rand = "0.8.5" To get started using Rand, see [The Book](https://rust-random.github.io/book). - ## Versions Rand is *mature* (suitable for general usage, with infrequent breaking releases -which minimise breakage) but not yet at 1.0. We maintain compatibility with -pinned versions of the Rust compiler (see below). - -Current Rand versions are: +which minimise breakage) but not yet at 1.0. Current versions are: -- Version 0.7 was released in June 2019, moving most non-uniform distributions - to an external crate, moving `from_entropy` to `SeedableRng`, and many small - changes and fixes. - Version 0.8 was released in December 2020 with many small changes. +- Version 0.9 is in development with many small changes. -A detailed [changelog](CHANGELOG.md) is available for releases. - -When upgrading to the next minor series (especially 0.4 → 0.5), we recommend -reading the [Upgrade Guide](https://rust-random.github.io/book/update.html). - -Rand has not yet reached 1.0 implying some breaking changes may arrive in the -future ([SemVer](https://semver.org/) allows each 0.x.0 release to include -breaking changes), but is considered *mature*: breaking changes are minimised -and breaking releases are infrequent. - -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. - -### Yanked versions - -Some versions of Rand crates have been yanked ("unreleased"). Where this occurs, -the crate's CHANGELOG *should* be updated with a rationale, and a search on the -issue tracker with the keyword `yank` *should* uncover the motivation. - -### Rust version requirements - -The Minimum Supported Rust Version (MSRV) is `rustc >= 1.61.0`. -Older releases may work (depending on feature configuration) but are untested. +See the [CHANGELOG](CHANGELOG.md) or [Upgrade Guide](https://rust-random.github.io/book/update.html) for more details. ## Crate Features @@ -113,7 +78,7 @@ Rand is built with these features enabled by default: Optionally, the following dependencies can be enabled: -- `log` enables logging via the `log` crate +- `log` enables logging via [log](https://crates.io/crates/log) Additionally, these features configure Rand: @@ -132,6 +97,12 @@ unavailable (unless `getrandom` is enabled), large parts of `seq` are unavailable (unless `alloc` is enabled), and `thread_rng` and `random` are unavailable. +## Portability and platform support + +Many (but not all) algorithms are intended to have reproducible output. Read more in the book: [Portability](https://rust-random.github.io/book/portability.html). + +The Rand library supports a variety of CPU architectures. Platform integration is outsourced to [getrandom](https://docs.rs/getrandom/latest/getrandom/). + ### WASM support Seeding entropy from OS on WASM target `wasm32-unknown-unknown` is not diff --git a/rand_chacha/README.md b/rand_chacha/README.md index 1692252568..6412538ead 100644 --- a/rand_chacha/README.md +++ b/rand_chacha/README.md @@ -5,7 +5,6 @@ [![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_chacha) [![API](https://docs.rs/rand_chacha/badge.svg)](https://docs.rs/rand_chacha) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) A cryptographically secure random number generator that uses the ChaCha algorithm. diff --git a/rand_core/README.md b/rand_core/README.md index 3edcd4a2f9..31c742d9f3 100644 --- a/rand_core/README.md +++ b/rand_core/README.md @@ -5,7 +5,6 @@ [![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.61+-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. diff --git a/rand_distr/README.md b/rand_distr/README.md index 8b43ba9e9a..f61e1b13d6 100644 --- a/rand_distr/README.md +++ b/rand_distr/README.md @@ -5,7 +5,6 @@ [![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_distr) [![API](https://docs.rs/rand_distr/badge.svg)](https://docs.rs/rand_distr) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) Implements a full suite of random number distribution sampling routines. diff --git a/rand_pcg/README.md b/rand_pcg/README.md index 8a4efbeb81..cb6f096492 100644 --- a/rand_pcg/README.md +++ b/rand_pcg/README.md @@ -5,7 +5,6 @@ [![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_pcg) [![API](https://docs.rs/rand_pcg/badge.svg)](https://docs.rs/rand_pcg) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) Implements a selection of PCG random number generators.