Skip to content

Commit 8ee82f4

Browse files
authored
Remove rand_chacha (#1658)
1 parent 6e80534 commit 8ee82f4

24 files changed

Lines changed: 11 additions & 1426 deletions

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
toolchain: nightly
4646
- name: rand
4747
run: cargo doc --all-features --no-deps
48-
- name: rand_chacha
49-
run: cargo doc --all-features --package rand_chacha --no-deps
5048
- name: rand_pcg
5149
run: cargo doc --all-features --package rand_pcg --no-deps
5250

@@ -112,8 +110,6 @@ jobs:
112110
cargo test --target ${{ matrix.target }} --features=serde,log,small_rng
113111
- name: Test rand_pcg
114112
run: cargo test --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
115-
- name: Test rand_chacha
116-
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml --features=serde
117113

118114
test-cross:
119115
runs-on: ${{ matrix.os }}
@@ -145,7 +141,6 @@ jobs:
145141
cross test --no-fail-fast --target ${{ matrix.target }} --features=serde,log,small_rng
146142
cross test --no-fail-fast --target ${{ matrix.target }} --examples
147143
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
148-
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml
149144
150145
test-miri:
151146
runs-on: ubuntu-latest
@@ -161,7 +156,6 @@ jobs:
161156
cargo miri test --no-default-features --lib --tests
162157
cargo miri test --features=log,small_rng
163158
cargo miri test --manifest-path rand_pcg/Cargo.toml --features=serde
164-
cargo miri test --manifest-path rand_chacha/Cargo.toml --no-default-features
165159
166160
test-no-std:
167161
runs-on: ubuntu-latest

Cargo.lock

Lines changed: 0 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ log = ["dep:log"]
6767

6868
[workspace]
6969
members = [
70-
"rand_chacha",
7170
"rand_pcg",
7271
]
7372
exclude = ["benches", "distr_test"]

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ distribution.
7676

7777
We aim to provide security fixes in the form of a new patch version for the
7878
latest release version of `rand` and its dependencies `rand_core` and
79-
`rand_chacha`, as well as for prior major and minor releases which were, at some
79+
`chacha20`, as well as for prior major and minor releases which were, at some
8080
time during the previous 12 months, the latest release version.
8181

8282
## Reporting a Vulnerability

benches/Cargo.lock

Lines changed: 1 addition & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ simd_support = ["rand/simd_support"]
1313
[dev-dependencies]
1414
rand = { path = "..", features = ["small_rng", "nightly"] }
1515
rand_pcg = { path = "../rand_pcg" }
16-
rand_chacha = { path = "../rand_chacha" }
16+
chacha20 = { version = "0.10.0-rc.7", default-features = false, features = ["rng"] }
1717
criterion = "0.5"
1818
criterion-cycles-per-byte = "0.6"
1919

benches/benches/generators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
88

9+
use chacha20::rand_core::UnwrapErr;
10+
use chacha20::{ChaCha8Rng, ChaCha12Rng, ChaCha20Core, ChaCha20Rng};
911
use core::time::Duration;
1012
use criterion::measurement::WallTime;
1113
use criterion::{BenchmarkGroup, Criterion, black_box, criterion_group, criterion_main};
1214
use rand::prelude::*;
1315
use rand::rngs::ReseedingRng;
1416
use rand::rngs::SysRng;
15-
use rand_chacha::rand_core::UnwrapErr;
16-
use rand_chacha::{ChaCha8Rng, ChaCha12Rng, ChaCha20Core, ChaCha20Rng};
1717
use rand_pcg::{Pcg32, Pcg64, Pcg64Dxsm, Pcg64Mcg};
1818

1919
criterion_group!(

benches/benches/seq_choose.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn bench(c: &mut Criterion) {
9494
b.iter(|| x.iter().cloned().sample_fill(&mut rng, &mut buf))
9595
});
9696

97-
bench_rng::<rand_chacha::ChaCha20Rng>(c, "ChaCha20");
97+
bench_rng::<chacha20::ChaCha20Rng>(c, "ChaCha20");
9898
bench_rng::<rand_pcg::Pcg32>(c, "Pcg32");
9999
bench_rng::<rand_pcg::Pcg64>(c, "Pcg64");
100100
}

benches/benches/shuffle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn bench(c: &mut Criterion) {
3030
})
3131
});
3232

33-
bench_rng::<rand_chacha::ChaCha12Rng>(c, "ChaCha12");
33+
bench_rng::<chacha20::ChaCha12Rng>(c, "ChaCha12");
3434
bench_rng::<rand_pcg::Pcg32>(c, "Pcg32");
3535
bench_rng::<rand_pcg::Pcg64>(c, "Pcg64");
3636
}

benches/benches/uniform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
1111
#![cfg_attr(feature = "simd_support", feature(portable_simd))]
1212

13+
use chacha20::ChaCha8Rng;
1314
use core::time::Duration;
1415
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
1516
use rand::distr::uniform::{SampleRange, Uniform};
1617
use rand::prelude::*;
17-
use rand_chacha::ChaCha8Rng;
1818
use rand_pcg::{Pcg32, Pcg64};
1919
#[cfg(feature = "simd_support")]
2020
use std::simd::{Simd, num::SimdUint};

0 commit comments

Comments
 (0)