Skip to content

Commit 6804374

Browse files
committed
Rename *-getrandom to getrandom-*
This also requires lots of changes to .travis.yml Signed-off-by: Joe Richey <[email protected]>
1 parent ab49fd7 commit 6804374

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

.travis.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
install:
2020
- rustup target add aarch64-apple-ios
2121
script:
22-
- cargo test --package getrandom --package cpurand-getrandom --tests
22+
- cargo test --package getrandom --package getrandom-cpu --tests
2323
- cargo build --target aarch64-apple-ios
2424

2525
- name: "Linux, beta"
@@ -67,16 +67,16 @@ jobs:
6767
- cargo web test --target asmjs-unknown-emscripten
6868
- cargo test --target wasm32-wasi
6969
# stdweb (wasm32-unknown-unknown) tests (Node, Chrome)
70-
- cargo web test --package stdweb-getrandom
71-
- cargo web test --package stdweb-getrandom --nodejs
70+
- cargo web test --package getrandom-stdweb
71+
- cargo web test --package getrandom-stdweb --nodejs
7272
# wasm-bindgen (wasm32-unknown-unknown) tests (Node, Firefox, Chrome)
73-
- cargo test --package wasm-bindgen-getrandom
73+
- cargo test --package getrandom-wasm-bindgen
7474
--target wasm32-unknown-unknown --test node
7575
- GECKODRIVER=$HOME/geckodriver
76-
cargo test --package wasm-bindgen-getrandom
76+
cargo test --package getrandom-wasm-bindgen
7777
--target wasm32-unknown-unknown --test web
7878
- CHROMEDRIVER=$HOME/chromedriver
79-
cargo test --package wasm-bindgen-getrandom
79+
cargo test --package getrandom-wasm-bindgen
8080
--target wasm32-unknown-unknown --test web
8181

8282
- &nightly_and_docs
@@ -93,13 +93,13 @@ jobs:
9393
# remove cached documentation, otherwise files from previous PRs can get included
9494
- rm -rf target/doc
9595
- cargo doc --no-deps --features=std,custom
96-
- cargo doc --no-deps --package cpurand-getrandom
97-
- cargo doc --no-deps --package wasm-bindgen-getrandom --target=wasm32-unknown-unknown
96+
- cargo doc --no-deps --package getrandom-cpu
97+
- cargo doc --no-deps --package getrandom-wasm-bindgen --target=wasm32-unknown-unknown
9898
- cargo deadlinks --dir target/doc
9999
# Check that our tests pass in the default/minimal configuration
100-
- cargo test --package getrandom --package cpurand-getrandom --tests --benches
100+
- cargo test --package getrandom --package getrandom-cpu --tests --benches
101101
- cargo generate-lockfile -Z minimal-versions
102-
- cargo test --package getrandom --package cpurand-getrandom --tests --benches
102+
- cargo test --package getrandom --package getrandom-cpu --tests --benches
103103

104104
- <<: *nightly_and_docs
105105
name: "OSX, nightly, docs"
@@ -132,18 +132,18 @@ jobs:
132132
# As all of the targets here are x86, it is enough to test that
133133
# getrandom and getrandom-cpu build for all x86 targets.
134134
- for TARGET in ${STD_TARGETS[@]}; do
135-
cargo build --package cpurand-getrandom --target $TARGET;
135+
cargo build --package getrandom-cpu --target $TARGET;
136136
done
137137
- for TARGET in ${NO_STD_TARGETS[@]}; do
138-
cargo xbuild --package cpurand-getrandom --target $TARGET;
138+
cargo xbuild --package getrandom-cpu --target $TARGET;
139139
done
140140
# Also check that minimum versions build
141141
- cargo generate-lockfile -Z minimal-versions
142142
- for TARGET in ${STD_TARGETS[@]}; do
143-
cargo build --package cpurand-getrandom --target $TARGET;
143+
cargo build --package getrandom-cpu --target $TARGET;
144144
done
145145
- for TARGET in ${NO_STD_TARGETS[@]}; do
146-
cargo xbuild --package cpurand-getrandom --target $TARGET;
146+
cargo xbuild --package getrandom-cpu --target $TARGET;
147147
done
148148

149149
# Trust cross-built/emulated targets. We must repeat all non-default values.
@@ -188,7 +188,7 @@ before_script:
188188
- export RUSTFLAGS="-D warnings"
189189

190190
script:
191-
- cargo test --package getrandom --package cpurand-getrandom --tests
191+
- cargo test --package getrandom --package getrandom-cpu --tests
192192

193193
after_script: set +e
194194

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ appveyor = { repository = "rust-random/getrandom" }
1616

1717
[workspace]
1818
members = [
19-
"custom/cpurand",
19+
"custom/cpu",
2020
"custom/stdweb",
2121
"custom/wasm-bindgen",
2222
]

custom/cpurand/Cargo.toml custom/cpu/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "cpurand-getrandom"
2+
name = "getrandom-cpu"
33
version = "0.1.0"
44
edition = "2018"
55
authors = ["The Rand Project Developers"]
66
license = "MIT OR Apache-2.0"
77
description = "Custom shim for using getrandom with CPU RNG instructions"
8-
documentation = "https://docs.rs/cpurand-getrandom"
8+
documentation = "https://docs.rs/getrandom-cpu"
99
repository = "https://github.com/rust-random/getrandom"
1010
categories = ["hardware-support", "no-std"]
1111

File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Call cpurand so that it will be invoked on std targets (like Linux).
2-
use cpurand_getrandom::cpurand as getrandom;
2+
use getrandom_cpu::cpurand as getrandom;
33
#[path = "../../../tests/common/mod.rs"]
44
mod common;

custom/cpurand/tests/normal.rs custom/cpu/tests/normal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Explicitly use the Custom RNG crate to link it in.
2-
use cpurand_getrandom as _;
2+
use getrandom_cpu as _;
33

44
use getrandom::getrandom;
55
#[path = "../../../tests/common/mod.rs"]

custom/stdweb/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "stdweb-getrandom"
2+
name = "getrandom-stdweb"
33
version = "0.1.0"
44
edition = "2018"
55
authors = ["The Rand Project Developers"]
66
license = "MIT OR Apache-2.0"
77
description = "Custom shim for using getrandom with stdweb"
8-
documentation = "https://docs.rs/stdweb-getrandom"
8+
documentation = "https://docs.rs/getrandom-stdweb"
99
repository = "https://github.com/rust-random/getrandom"
1010
categories = ["wasm"]
1111

custom/stdweb/tests/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Explicitly use the Custom RNG crate to link it in.
2-
use stdweb_getrandom as _;
2+
use getrandom_stdweb as _;
33

44
use getrandom::getrandom;
55
use test;

custom/wasm-bindgen/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "wasm-bindgen-getrandom"
2+
name = "getrandom-wasm-bindgen"
33
version = "0.1.0"
44
edition = "2018"
55
authors = ["The Rand Project Developers"]
66
license = "MIT OR Apache-2.0"
77
description = "Custom shim for using getrandom with wasm-bindgen"
8-
documentation = "https://docs.rs/wasm-bindgen-getrandom"
8+
documentation = "https://docs.rs/getrandom-wasm-bindgen"
99
repository = "https://github.com/rust-random/getrandom"
1010
categories = ["wasm"]
1111

custom/wasm-bindgen/tests/node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Explicitly use the Custom RNG crate to link it in.
2-
use wasm_bindgen_getrandom as _;
2+
use getrandom_wasm_bindgen as _;
33

44
use getrandom::getrandom;
55
use wasm_bindgen_test::wasm_bindgen_test as test;

custom/wasm-bindgen/tests/web.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Explicitly use the Custom RNG crate to link it in.
2-
use wasm_bindgen_getrandom as _;
2+
use getrandom_wasm_bindgen as _;
33

44
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
55

0 commit comments

Comments
 (0)