Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare new releases, from_rng Endianness and inlining #815

Merged
merged 14 commits into from
Jun 6, 2019
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.


## Unreleased
## [0.7.0 Pre-release] - 2019-06-06
Many changes (TODO)
- Enable fork protection of ReseedingRng without `std`
- Remove dependency on `winapi`

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand"
version = "0.6.5"
version = "0.7.0-pre.0"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -54,7 +54,7 @@ members = [
]

[dependencies]
rand_core = { path = "rand_core", version = "0.4" }
rand_core = { path = "rand_core", version = "0.5" }
rand_pcg = { path = "rand_pcg", version = "0.1", optional = true }
# Do not depend on 'getrandom_package' directly; use the 'getrandom' feature!
getrandom_package = { version = "0.1.1", package = "getrandom", optional = true }
Expand Down Expand Up @@ -114,4 +114,4 @@ required-features = ["small_rng"]
all-features = true

[patch.crates-io]
rand_core = { path = "rand_core", version = "0.4" }
rand_core = { path = "rand_core", version = "0.5" }
3 changes: 3 additions & 0 deletions rand_chacha/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2019-06-06
- Rewrite based on the much faster `c2-chacha` crate (#789)

## [0.1.1] - 2019-01-04
- Disable `i128` and `u128` if the `target_os` is `emscripten` (#671: work-around Emscripten limitation)
- Update readme and doc links
Expand Down
4 changes: 2 additions & 2 deletions rand_chacha/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_chacha"
version = "0.2.1"
version = "0.2.0"
authors = ["The Rand Project Developers", "The Rust Project Developers", "The CryptoCorrosion Contributors"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
c2-chacha = { version = "0.2.2", default-features = false }

[build-dependencies]
Expand Down
5 changes: 4 additions & 1 deletion rand_chacha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ as an RNG. It is an improved variant of the Salsa20 cipher family, which was
selected as one of the "stream ciphers suitable for widespread adoption" by
eSTREAM[^2].

The RNGs provided by this crate are implemented via the fast stream ciphers of
the [`c2-chacha`](https://crates.io/crates/c2-chacha) crate.

Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_chacha)
- [API documentation (docs.rs)](https://docs.rs/rand_chacha)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_chacha/CHANGELOG.md)

[rand]: https://crates.io/crates/rand
[^1]: D. J. Bernstein, [*ChaCha, a variant of Salsa20*](
Expand Down
4 changes: 4 additions & 0 deletions rand_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2019-06-06
- Enable testing with Miri and fix incorrect pointer usages (#779, #780, #781, #783, #784)
- Rewrite `Error` type and adjust API (#800)

## [0.4.0] - 2019-01-24
- Disable the `std` feature by default (#702)

Expand Down
2 changes: 1 addition & 1 deletion rand_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_core"
version = "0.4.0"
version = "0.5.0"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand Down
7 changes: 6 additions & 1 deletion rand_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -42,6 +42,11 @@ 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`
Expand Down
3 changes: 3 additions & 0 deletions rand_hc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2019-06-06
- Bump `rand_core` version

## [0.1.0] - 2018-10-17
- Pulled out of the Rand crate
4 changes: 2 additions & 2 deletions rand_hc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_hc"
version = "0.1.0"
version = "0.1.1"
authors = ["The Rand Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -18,4 +18,4 @@ travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
2 changes: 1 addition & 1 deletion rand_hc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_hc)
- [API documentation (docs.rs)](https://docs.rs/rand_hc)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_hc/CHANGELOG.md)

[rand]: https://crates.io/crates/rand
[^1]: Hongjun Wu (2008). ["The Stream Cipher HC-128"](
Expand Down
4 changes: 4 additions & 0 deletions rand_isaac/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.2] - 2019-06-06
- Bump `rand_core` version
- Remove deprecated code

dhardy marked this conversation as resolved.
Show resolved Hide resolved
## [0.1.1] - 2018-11-26
- Fix `rand_core` version requirement
- Fix doc links
Expand Down
4 changes: 2 additions & 2 deletions rand_isaac/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_isaac"
version = "0.1.1"
version = "0.1.2"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -21,7 +21,7 @@ appveyor = { repository = "rust-random/rand" }
serde1 = ["serde", "serde_derive", "rand_core/serde1"]

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion rand_isaac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_isaac)
- [API documentation (docs.rs)](https://docs.rs/rand_isaac)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_isaac/CHANGELOG.md)

[rand]: https://crates.io/crates/rand
[^1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number generator*](http://burtleburtle.net/bob/rand/isaacafa.html)
Expand Down
6 changes: 6 additions & 0 deletions rand_jitter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2019-06-06
- Bump `rand_core` version
- Support new `Error` type in `rand_core` 0.5
- Remove CryptoRng trait bound (#699, #814)
- Enable doc-testing of README

## [0.1.4] - 2019-05-02
- Change error conversion code to partially fix #738

Expand Down
4 changes: 2 additions & 2 deletions rand_jitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_jitter"
version = "0.1.4"
version = "0.2.0"
authors = ["The Rand Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand All @@ -14,7 +14,7 @@ travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
log = { version = "0.4", optional = true }

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rand_jitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_jitter)
- [API documentation (docs.rs)](https://docs.rs/rand_jitter)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_jitter/CHANGELOG.md)

## Features

Expand Down
2 changes: 1 addition & 1 deletion rand_os/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.2.0] - 2019-04-08
## [0.2.0] - 2019-06-06
Replaced implementation with a backwards-compatible shim around
[getrandom](https://crates.io/crates/getrandom).

Expand Down
2 changes: 1 addition & 1 deletion rand_os/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ wasm-bindgen = ["getrandom/wasm-bindgen"]
stdweb = ["getrandom/stdweb"]

[dependencies]
rand_core = { path = "../rand_core", version = "0.4", features = ["std"] }
rand_core = { path = "../rand_core", version = "0.5", features = ["std"] }
getrandom = "0.1.1"
2 changes: 1 addition & 1 deletion rand_os/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_os)
- [API documentation (docs.rs)](https://docs.rs/rand_os)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_os/CHANGELOG.md)

## License

Expand Down
2 changes: 1 addition & 1 deletion rand_pcg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ appveyor = { repository = "rust-random/rand" }
serde1 = ["serde", "serde_derive"]

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion rand_pcg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_pcg)
- [API documentation (docs.rs)](https://docs.rs/rand_pcg)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_pcg/CHANGELOG.md)


## Crate Features
Expand Down
3 changes: 3 additions & 0 deletions rand_xorshift/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.2] - 2019-06-06
- Bump `rand_core` version

## [0.1.1] - 2019-01-04
- Reorganise code and tests; tweak doc

Expand Down
4 changes: 2 additions & 2 deletions rand_xorshift/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_xorshift"
version = "0.1.1"
version = "0.1.2"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -21,7 +21,7 @@ appveyor = { repository = "rust-random/rand" }
serde1 = ["serde", "serde_derive"]

[dependencies]
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion rand_xorshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_xorshift)
- [API documentation (docs.rs)](https://docs.rs/rand_xorshift)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_xorshift/CHANGELOG.md)

[rand]: https://crates.io/crates/rand

Expand Down
7 changes: 4 additions & 3 deletions rand_xorshift/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ fn test_xorshift_construction() {
let mut rng1 = XorShiftRng::from_seed(seed);
assert_eq!(rng1.next_u64(), 4325440999699518727);

let _rng2 = XorShiftRng::from_rng(rng1).unwrap();
// Note: we cannot test the state of _rng2 because from_rng does not
// fix Endianness. This is allowed in the trait specification.
let mut rng2 = XorShiftRng::from_rng(&mut rng1).unwrap();
// Yes, this makes rng2 a clone of rng1!
assert_eq!(rng1.next_u64(), 15614385950550801700);
assert_eq!(rng2.next_u64(), 15614385950550801700);
}

#[test]
Expand Down
4 changes: 4 additions & 0 deletions rand_xoshiro/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1] - 2019-06-06
- Bump `rand_core` version
- Document crate features in README

## [0.2.0] - 2019-05-28
- Fix `seed_from_u64(0)` for `Xoroshiro64StarStar` and `Xoroshiro64Star`. This
breaks value stability for these generators if initialized with `seed_from_u64`.
Expand Down
4 changes: 2 additions & 2 deletions rand_xoshiro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_xoshiro"
version = "0.2.0" # NB: When modifying, also modify html_root_url in lib.rs
version = "0.2.1" # NB: When modifying, also modify html_root_url in lib.rs
authors = ["The Rand Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -16,7 +16,7 @@ serde1 = ["serde", "serde_derive"]

[dependencies]
byteorder = { version = "1", default-features=false }
rand_core = { path = "../rand_core", version = "0.4" }
rand_core = { path = "../rand_core", version = "0.5" }
serde = { version = "1", optional=true }
serde_derive = { version = "^1.0.38", optional=true }

Expand Down
2 changes: 1 addition & 1 deletion rand_xoshiro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Links:

- [API documentation (master)](https://rust-random.github.io/rand/rand_xoshiro)
- [API documentation (docs.rs)](https://docs.rs/rand_xoshiro)
- [Changelog](CHANGELOG.md)
- [Changelog](https://github.com/rust-random/rand/blob/master/rand_xoshiro/CHANGELOG.md)

## Crate Features

Expand Down
2 changes: 1 addition & 1 deletion rand_xoshiro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://docs.rs/rand_xoshiro/0.2.0")]
html_root_url = "https://docs.rs/rand_xoshiro/0.2.1")]

#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
Expand Down