rand/Cargo.toml

88 lines
2.7 KiB
TOML
Raw Normal View History

[package]
name = "rand"
version = "0.7.4"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
2019-08-08 11:44:35 +03:00
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-random/rand"
2020-12-15 10:08:34 +00:00
documentation = "https://docs.rs/rand"
homepage = "https://crates.io/crates/rand"
description = """
Random number generators and other randomness functionality.
"""
keywords = ["random", "rng"]
2018-03-27 13:59:28 +02:00
categories = ["algorithms", "no-std"]
autobenches = true
2019-06-12 16:46:23 +02:00
edition = "2018"
Reduce packaged crate size by 5kb using `cargo diet -r` (#983) * Reduce packaged crate size by 5kb using `cargo diet -r` It converted excludes into includes, removing the following files from the package. ┌───────────────────────────────────────────┬─────────────┐ │ File │ Size (Byte) │ ├───────────────────────────────────────────┼─────────────┤ │ .gitignore │ 77 │ │ .github/ISSUE_TEMPLATE/other.md │ 80 │ │ .github/ISSUE_TEMPLATE/feature_request.md │ 274 │ │ .github/ISSUE_TEMPLATE/compile-issue.md │ 488 │ │ utils/ci/install_cargo_web.sh │ 536 │ │ COPYRIGHT │ 569 │ │ utils/ci/miri.sh │ 815 │ │ rustfmt.toml │ 863 │ │ benches/weighted.rs │ 1088 │ │ utils/ci/install.sh │ 1381 │ │ utils/ci/script.sh │ 1583 │ │ examples/monte-carlo.rs │ 1611 │ │ appveyor.yml │ 2098 │ │ SECURITY.md │ 2822 │ │ .travis.yml │ 2952 │ │ utils/ziggurat_tables.py │ 3929 │ │ examples/monty-hall.rs │ 4004 │ │ benches/misc.rs │ 4524 │ │ benches/seq.rs │ 5410 │ │ benches/generators.rs │ 5490 │ └───────────────────────────────────────────┴─────────────┘ * Include COPIRIGHT in package * Ignore benchmarks and tests in rand_distr * prefer using 'src/' instead of 'src/**/*'
2020-05-31 23:18:05 +08:00
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
2017-02-26 11:04:13 +01:00
[features]
2019-05-07 09:57:43 +01:00
# Meta-features:
2020-03-09 15:22:13 +00:00
default = ["std", "std_rng"]
nightly = [] # enables performance optimizations requiring nightly rust
serde1 = ["serde"]
2019-05-07 09:57:43 +01:00
2020-03-10 12:14:36 +00:00
# Option (enabled by default): without "std" rand uses libcore; this option
# enables functionality expected to be available on a standard platform.
std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom", "libc"]
2020-03-09 15:22:13 +00:00
# Option: "alloc" enables support for Vec and Box when not using "std"
alloc = ["rand_core/alloc"]
# Option: use getrandom package for seeding
getrandom = ["rand_core/getrandom"]
2017-02-26 11:04:13 +01:00
2020-03-10 12:14:36 +00:00
# Option (requires nightly): experimental SIMD support
2020-03-09 15:22:13 +00:00
simd_support = ["packed_simd"]
2020-03-10 12:14:36 +00:00
# Option (enabled by default): enable StdRng
2020-03-09 15:22:13 +00:00
std_rng = ["rand_chacha", "rand_hc"]
# Option: enable SmallRng
small_rng = []
2019-05-07 09:57:43 +01:00
2018-03-27 13:59:28 +02:00
[workspace]
2018-12-29 15:29:51 +00:00
members = [
"rand_core",
"rand_distr",
2018-12-29 15:29:51 +00:00
"rand_chacha",
"rand_hc",
"rand_pcg",
]
2018-01-21 20:41:18 -08:00
2018-03-27 13:59:28 +02:00
[dependencies]
2020-12-07 11:09:20 +00:00
rand_core = { path = "rand_core", version = "0.6.0" }
log = { version = "0.4.4", optional = true }
serde = { version = "1.0.103", features = ["derive"], optional = true }
[dependencies.packed_simd]
# NOTE: so far no version works reliably due to dependence on unstable features
2020-10-08 17:34:27 +02:00
package = "packed_simd_2"
version = "0.3.4"
optional = true
features = ["into_bits"]
2018-01-21 20:41:18 -08:00
2017-11-10 14:25:31 -05:00
[target.'cfg(unix)'.dependencies]
# Used for fork protection (reseeding.rs)
libc = { version = "0.2.22", optional = true, default-features = false }
# Emscripten does not support 128-bit integers, which are used by ChaCha code.
# We work around this by using a different RNG.
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
2020-12-07 16:57:06 +00:00
rand_chacha = { path = "rand_chacha", version = "0.3.0", default-features = false, optional = true }
[target.'cfg(target_os = "emscripten")'.dependencies]
2020-12-07 11:28:13 +00:00
rand_hc = { path = "rand_hc", version = "0.3.0", optional = true }
2018-01-21 20:41:18 -08:00
[dev-dependencies]
2020-12-07 16:41:29 +00:00
rand_pcg = { path = "rand_pcg", version = "0.3.0" }
2019-01-04 11:39:47 +00:00
# Only for benches:
2020-12-07 11:28:13 +00:00
rand_hc = { path = "rand_hc", version = "0.3.0" }
# Only to test serde1
bincode = "1.2.1"
2018-04-02 09:36:40 +02:00
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
2018-04-02 09:36:40 +02:00
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]