Skip to content

Commit c4b9390

Browse files
authored
Merge pull request #853 from dhardy/core-0.4
rand_core 0.4.1 (backports)
2 parents 8112daa + 1b58378 commit c4b9390

File tree

23 files changed

+106
-121
lines changed

23 files changed

+106
-121
lines changed

.travis.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sudo: false
4040
# - test no_std support, but only the unit tests:
4141
# `cargo test --lib --no-default-features`
4242
# - run unit tests and doctests with all features which are available on stable:
43-
# `cargo test --features=serde1,log`
43+
# `cargo test --features=log`
4444
# - test examples:
4545
# `cargo test --examples`
4646
# Additional tests on nightly:
@@ -64,7 +64,7 @@ matrix:
6464
# Differs from standard script: rand_pcg features
6565
- cargo test --lib --no-default-features
6666
# TODO: add simd_support feature:
67-
- cargo test --features=serde1,log
67+
- cargo test --features=log
6868
- cargo test --examples
6969
- cargo test --manifest-path rand_core/Cargo.toml
7070
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
@@ -86,7 +86,7 @@ matrix:
8686
# Differs from standard script: includes aarch64-apple-ios cross-build
8787
- cargo test --lib --no-default-features
8888
# TODO: add simd_support feature:
89-
- cargo test --features=serde1,log
89+
- cargo test --features=log
9090
- cargo test --examples
9191
- cargo test --manifest-path rand_core/Cargo.toml
9292
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
@@ -113,7 +113,8 @@ matrix:
113113
script:
114114
# Differs from standard script: alloc feature, all features, doc build
115115
- cargo test --lib --no-default-features --features=alloc
116-
- cargo test --all-features
116+
# Excludes serde1:
117+
- cargo test --features=nightly,simd_support,log
117118
- cargo test --benches --features=nightly
118119
- cargo test --examples
119120
- cargo test --manifest-path rand_core/Cargo.toml
@@ -207,7 +208,7 @@ before_install:
207208
script:
208209
- cargo test --lib --no-default-features
209210
# TODO: add simd_support feature:
210-
- cargo test --features=serde1,log
211+
- cargo test --features=log
211212
- cargo test --examples
212213
- cargo test --manifest-path rand_core/Cargo.toml
213214
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
77
repository = "https://github.com/rust-random/rand"
8-
documentation = "https://rust-random.github.io/rand"
8+
documentation = "https://rust-random.github.io/rand/"
99
homepage = "https://crates.io/crates/rand"
1010
description = """
1111
Random number generators and other randomness functionality.

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ To get started using Rand, see [The Book](https://rust-random.github.io/book).
3838

3939
## Versions
4040

41+
Rand libs have inter-dependencies and make use of the
42+
[semver trick](https://github.com/dtolnay/semver-trick/) in order to make traits
43+
compatible across crate versions. (This is especially important for `RngCore`
44+
and `SeedableRng`.) A few crate releases are thus compatibility shims,
45+
depending on the *next* lib version (e.g. `rand_core` versions `0.2.2` and
46+
`0.3.1`). This means, for example, that `rand_core_0_4_0::SeedableRng` and
47+
`rand_core_0_3_0::SeedableRng` are distinct, incompatible traits, which can
48+
cause build errors. Usually, running `cargo update` is enough to fix any issues.
49+
4150
The Rand lib is not yet stable, however we are careful to limit breaking changes
4251
and warn via deprecation wherever possible. Patch versions never introduce
4352
breaking changes. The following minor versions are supported:

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ build: false
3434
test_script:
3535
- cargo test --lib --no-default-features --features alloc
3636
# TODO: use --all-features once simd_support is sufficiently stable:
37-
- cargo test --features=serde1,log
37+
- cargo test --features=log
3838
- cargo test --benches --features=nightly
3939
- cargo test --examples
4040
- cargo test --manifest-path rand_core/Cargo.toml

rand_chacha/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
77
repository = "https://github.com/rust-random/rand"
8-
documentation = "https://rust-random.github.io/rand/rand_chacha"
8+
documentation = "https://rust-random.github.io/rand/rand_chacha/"
99
homepage = "https://crates.io/crates/rand_chacha"
1010
description = """
1111
ChaCha random number generator

rand_core/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.1] - 2019-07-29
8+
Back-port non-API changes from version 0.5.0:
9+
- Enable testing with Miri and fix incorrect pointer usages (#779, #780, #781, #783, #784)
10+
- Adjust usage of `#[inline]` for `BlockRng` and `BlockRng64`
11+
712
## [0.4.0] - 2019-01-24
813
- Disable the `std` feature by default (#702)
914

rand_core/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "rand_core"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
77
repository = "https://github.com/rust-random/rand"
8-
documentation = "https://rust-random.github.io/rand/rand_core"
8+
documentation = "https://rust-random.github.io/rand/rand_core/"
99
homepage = "https://crates.io/crates/rand_core"
1010
description = """
1111
Core random number generator traits and tools for implementation.

rand_core/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ The `rand_core` crate provides:
4040

4141
The traits and error types are also available via `rand`.
4242

43+
## Versions
44+
45+
Rand libs have inter-dependencies and make use of the
46+
[semver trick](https://github.com/dtolnay/semver-trick/) in order to make traits
47+
compatible across crate versions. (This is especially important for `RngCore`
48+
and `SeedableRng`.) A few crate releases are thus compatibility shims,
49+
depending on the *next* lib version (e.g. `rand_core` versions `0.2.2` and
50+
`0.3.1`). This means, for example, that `rand_core_0_4_0::SeedableRng` and
51+
`rand_core_0_3_0::SeedableRng` are distinct, incompatible traits, which can
52+
cause build errors. Usually, running `cargo update` is enough to fix any issues.
53+
4354
## Crate Features
4455

4556
`rand_core` supports `no_std` and `alloc`-only configurations, as well as full

0 commit comments

Comments
 (0)