From 32343a6f371dd99635bdd74119300e1eb8661a34 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Tue, 17 Aug 2021 09:55:53 +0100 Subject: [PATCH] Rearrange Cargo.toml --- Cargo.toml | 18 +++++++++--------- rand_core/Cargo.toml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1597b125..19cf619a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/rand_core/Cargo.toml b/rand_core/Cargo.toml index 6604bc5a..c9ce4263 100644 --- a/rand_core/Cargo.toml +++ b/rand_core/Cargo.toml @@ -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 }