Don't add std feature to rand_isaac and rand_xorshift
This commit is contained in:
parent
e7b17ddce3
commit
29a9d1df58
20
.travis.yml
20
.travis.yml
@ -14,10 +14,8 @@ matrix:
|
||||
# TODO: use --tests instead of --lib on more recent compiler
|
||||
- cargo test --lib --no-default-features
|
||||
- cargo test --package rand_core --no-default-features
|
||||
- cargo test --package rand_isaac --no-default-features
|
||||
- cargo test --package rand_isaac --features serde1,std
|
||||
- cargo test --package rand_xorshift --no-default-features
|
||||
- cargo test --package rand_xorshift --features serde1,std
|
||||
- cargo test --package rand_isaac --features serde1
|
||||
- cargo test --package rand_xorshift --features serde1
|
||||
- cargo test --features serde1,log
|
||||
- rust: stable
|
||||
os: osx
|
||||
@ -25,20 +23,16 @@ matrix:
|
||||
script:
|
||||
- cargo test --tests --no-default-features
|
||||
- cargo test --package rand_core --no-default-features
|
||||
- cargo test --package rand_isaac --no-default-features
|
||||
- cargo test --package rand_isaac --features serde1,std
|
||||
- cargo test --package rand_xorshift --no-default-features
|
||||
- cargo test --package rand_xorshift --features serde1,std
|
||||
- cargo test --package rand_isaac --features serde1
|
||||
- cargo test --package rand_xorshift --features serde1
|
||||
- cargo test --features serde1,log
|
||||
- rust: beta
|
||||
install:
|
||||
script:
|
||||
- cargo test --tests --no-default-features
|
||||
- cargo test --package rand_core --no-default-features
|
||||
- cargo test --package rand_isaac --no-default-features
|
||||
- cargo test --package rand_isaac --features serde1,std
|
||||
- cargo test --package rand_xorshift --no-default-features
|
||||
- cargo test --package rand_xorshift --features serde1,std
|
||||
- cargo test --package rand_isaac --features serde1
|
||||
- cargo test --package rand_xorshift --features serde1
|
||||
- cargo test --features serde1,log
|
||||
- rust: nightly
|
||||
install:
|
||||
@ -49,7 +43,7 @@ matrix:
|
||||
- cargo test --tests --no-default-features --features=alloc
|
||||
- cargo test --package rand_core --no-default-features --features=alloc,serde1
|
||||
- cargo test --features serde1,log,nightly,alloc
|
||||
- cargo test --all --all-features --benches
|
||||
- cargo test --all --benches
|
||||
# remove cached documentation, otherwise files from previous PRs can get included
|
||||
- rm -rf target/doc
|
||||
- cargo doc --no-deps --all --all-features
|
||||
|
@ -20,7 +20,7 @@ appveyor = { repository = "alexcrichton/rand" }
|
||||
[features]
|
||||
default = ["std" ] # without "std" rand uses libcore
|
||||
nightly = ["i128_support", "simd_support"] # enables all features requiring nightly rust
|
||||
std = ["rand_core/std", "rand_isaac/std", "rand_xorshift/std", "alloc", "libc", "winapi", "cloudabi", "fuchsia-zircon"]
|
||||
std = ["rand_core/std", "alloc", "libc", "winapi", "cloudabi", "fuchsia-zircon"]
|
||||
alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
|
||||
i128_support = [] # enables i128 and u128 support
|
||||
simd_support = [] # enables SIMD support
|
||||
|
@ -19,7 +19,6 @@ appveyor = { repository = "alexcrichton/rand" }
|
||||
|
||||
[features]
|
||||
serde1 = ["serde", "serde_derive", "rand_core/serde1"]
|
||||
std = []
|
||||
|
||||
[dependencies]
|
||||
rand_core = { path = "../rand_core", version = "0.2", default-features=false }
|
||||
|
@ -18,15 +18,17 @@
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
||||
|
||||
#![cfg_attr(not(feature="std"), no_std)]
|
||||
#![cfg_attr(not(all(feature="serde1", test)), no_std)]
|
||||
|
||||
#[cfg(feature="std")] extern crate std as core;
|
||||
extern crate rand_core;
|
||||
|
||||
#[cfg(all(feature="serde1", test))] extern crate bincode;
|
||||
#[cfg(feature="serde1")] extern crate serde;
|
||||
#[cfg(feature="serde1")] #[macro_use] extern crate serde_derive;
|
||||
|
||||
// To test serialization we need bincode and the standard library
|
||||
#[cfg(all(feature="serde1", test))] extern crate bincode;
|
||||
#[cfg(all(feature="serde1", test))] extern crate std as core;
|
||||
|
||||
pub mod isaac;
|
||||
pub mod isaac64;
|
||||
|
||||
|
@ -19,7 +19,6 @@ appveyor = { repository = "alexcrichton/rand" }
|
||||
|
||||
[features]
|
||||
serde1 = ["serde", "serde_derive"]
|
||||
std = []
|
||||
|
||||
[dependencies]
|
||||
rand_core = { path = "../rand_core", version = "0.2", default-features=false }
|
||||
|
@ -18,14 +18,16 @@
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
||||
|
||||
#![cfg_attr(not(feature="std"), no_std)]
|
||||
#![cfg_attr(not(all(feature="serde1", test)), no_std)]
|
||||
|
||||
#[cfg(feature="std")] extern crate std as core;
|
||||
extern crate rand_core;
|
||||
|
||||
#[cfg(feature="serde1")] extern crate serde;
|
||||
#[cfg(feature="serde1")] #[macro_use] extern crate serde_derive;
|
||||
|
||||
// To test serialization we need bincode and the standard library
|
||||
#[cfg(all(feature="serde1", test))] extern crate bincode;
|
||||
#[cfg(all(feature="serde1", test))] extern crate std as core;
|
||||
|
||||
mod xorshift;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user