Rearrange Cargo.toml

This commit is contained in:
Diggory Hardy 2021-08-17 09:55:53 +01:00
parent e64df6631e
commit 32343a6f37
2 changed files with 18 additions and 18 deletions

View File

@ -16,6 +16,15 @@ autobenches = true
edition = "2018"
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
[package.metadata.playground]
features = ["small_rng", "serde1"]
[features]
# Meta-features:
default = ["std", "std_rng"]
@ -74,12 +83,3 @@ libc = { version = "0.2.22", optional = true, default-features = false }
rand_pcg = { path = "rand_pcg", version = "0.3.0" }
# Only to test serde1
bincode = "1.2.1"
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
[package.metadata.playground]
features = ["small_rng", "serde1"]

View File

@ -14,15 +14,6 @@ keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]
edition = "2018"
[features]
std = ["alloc", "getrandom", "getrandom/std"] # use std library; should be default but for above bug
alloc = [] # enables Vec and Box support without std
serde1 = ["serde"] # enables serde for BlockRng wrapper
[dependencies]
serde = { version = "1", features = ["derive"], optional = true }
getrandom = { version = "0.2", optional = true }
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
@ -31,3 +22,12 @@ rustdoc-args = ["--cfg", "doc_cfg"]
[package.metadata.playground]
all-features = true
[features]
std = ["alloc", "getrandom", "getrandom/std"] # use std library; should be default but for above bug
alloc = [] # enables Vec and Box support without std
serde1 = ["serde"] # enables serde for BlockRng wrapper
[dependencies]
serde = { version = "1", features = ["derive"], optional = true }
getrandom = { version = "0.2", optional = true }