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

rand: Remove serde1 feature #830

Merged
merged 2 commits into from Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -24,11 +24,11 @@ appveyor = { repository = "rust-random/rand" }
# Meta-features:
default = ["std"] # without "std" rand uses libcore
nightly = ["simd_support"] # enables all features requiring nightly rust
serde1 = [] # does nothing, deprecated

# Optional dependencies:
std = ["rand_core/std", "alloc", "getrandom"]
alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
serde1 = ["rand_core/serde1", "rand_isaac/serde1", "rand_xorshift/serde1"] # enables serialization for PRNGs
# re-export optional WASM dependencies to avoid breakage:
wasm-bindgen = ["getrandom_package/wasm-bindgen"]
stdweb = ["getrandom_package/stdweb"]
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -94,7 +94,6 @@ Rand is built with these features enabled by default:
Optionally, the following dependencies can be enabled:

- `log` enables logging via the `log` crate
- `serde1` enables serialization for some types, via Serde version 1
- `stdweb` implies `getrandom/stdweb` to enable
`getrandom` support on `wasm32-unknown-unknown`
- `wasm-bindgen` implies `getrandom/wasm-bindgen` to enable
Expand Down
5 changes: 3 additions & 2 deletions utils/ci/miri.sh
Expand Up @@ -8,14 +8,15 @@ rustup component add miri
cargo miri setup

cargo miri test --no-default-features -- -Zmiri-seed=42 -- -Zunstable-options --exclude-should-panic
cargo miri test --features=serde1,log -- -Zmiri-seed=42 -- -Zunstable-options --exclude-should-panic
cargo miri test --features=log -- -Zmiri-seed=42 -- -Zunstable-options --exclude-should-panic
cargo miri test --manifest-path rand_core/Cargo.toml
cargo miri test --manifest-path rand_core/Cargo.toml --features=serde1
cargo miri test --manifest-path rand_core/Cargo.toml --no-default-features
#cargo miri test --manifest-path rand_distr/Cargo.toml # no unsafe and lots of slow tests
cargo miri test --manifest-path rand_isaac/Cargo.toml --features=serde1
cargo miri test --manifest-path rand_pcg/Cargo.toml --features=serde1
cargo miri test --manifest-path rand_xorshift/Cargo.toml --features=serde1
cargo miri test --manifest-path rand_xoshiro/Cargo.toml
cargo miri test --manifest-path rand_xoshiro/Cargo.toml --features=serde1
dhardy marked this conversation as resolved.
Show resolved Hide resolved
cargo miri test --manifest-path rand_chacha/Cargo.toml --no-default-features
cargo miri test --manifest-path rand_hc/Cargo.toml
cargo miri test --manifest-path rand_jitter/Cargo.toml
Expand Down
5 changes: 3 additions & 2 deletions utils/ci/script.sh
Expand Up @@ -5,15 +5,16 @@ set -ex
main() {
cross test --target $TARGET --tests --no-default-features
# TODO: add simd_support feature:
cross test --target $TARGET --features=serde1,log
cross test --target $TARGET --features=log
cross test --target $TARGET --examples
cross test --target $TARGET --manifest-path rand_core/Cargo.toml
cross test --target $TARGET --manifest-path rand_core/Cargo.toml --features=serde1
cross test --target $TARGET --manifest-path rand_core/Cargo.toml --no-default-features
cross test --target $TARGET --manifest-path rand_distr/Cargo.toml
cross test --target $TARGET --manifest-path rand_isaac/Cargo.toml --features=serde1
cross test --target $TARGET --manifest-path rand_pcg/Cargo.toml --features=serde1
cross test --target $TARGET --manifest-path rand_xorshift/Cargo.toml --features=serde1
cross test --target $TARGET --manifest-path rand_xoshiro/Cargo.toml
cross test --target $TARGET --manifest-path rand_xoshiro/Cargo.toml --features=serde1
cross test --target $TARGET --manifest-path rand_chacha/Cargo.toml
cross test --target $TARGET --manifest-path rand_hc/Cargo.toml
cross test --target $TARGET --manifest-path rand_os/Cargo.toml
Expand Down