Skip to content

Commit

Permalink
Merge pull request #830 from vks/serde-features
Browse files Browse the repository at this point in the history
rand: Remove serde1 feature
  • Loading branch information
dhardy committed Jun 25, 2019
2 parents 7034524 + 5b530fb commit fb7b260
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
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
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

0 comments on commit fb7b260

Please sign in to comment.