2015-02-03 16:57:35 +11:00
|
|
|
[package]
|
|
|
|
name = "rand"
|
2020-05-29 08:40:09 +00:00
|
|
|
version = "0.7.4"
|
2018-09-17 10:06:28 +01:00
|
|
|
authors = ["The Rand Project Developers", "The Rust Project Developers"]
|
2019-08-08 11:44:35 +03:00
|
|
|
license = "MIT OR Apache-2.0"
|
2015-02-03 16:57:35 +11:00
|
|
|
readme = "README.md"
|
2018-08-13 18:00:37 +01:00
|
|
|
repository = "https://github.com/rust-random/rand"
|
2020-12-15 10:08:34 +00:00
|
|
|
documentation = "https://docs.rs/rand"
|
2018-03-20 15:30:32 +00:00
|
|
|
homepage = "https://crates.io/crates/rand"
|
2015-02-03 16:57:35 +11:00
|
|
|
description = """
|
|
|
|
Random number generators and other randomness functionality.
|
|
|
|
"""
|
2015-09-03 17:36:44 -06:00
|
|
|
keywords = ["random", "rng"]
|
2018-03-27 13:59:28 +02:00
|
|
|
categories = ["algorithms", "no-std"]
|
2019-05-15 10:26:18 +01:00
|
|
|
autobenches = true
|
2019-06-12 16:46:23 +02:00
|
|
|
edition = "2018"
|
2020-05-31 23:18:05 +08:00
|
|
|
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
|
2015-02-03 16:57:35 +11:00
|
|
|
|
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"]
|
2020-09-22 16:59:16 +02:00
|
|
|
nightly = [] # enables performance optimizations requiring nightly rust
|
2020-05-18 10:24:26 +02:00
|
|
|
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.
|
2020-01-08 14:46:14 +00:00
|
|
|
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
|
2020-03-09 14:35:52 +00:00
|
|
|
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
|
2020-09-06 23:39:51 +02:00
|
|
|
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",
|
2019-03-27 16:12:09 +00:00
|
|
|
"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" }
|
2019-08-28 16:36:20 +01:00
|
|
|
log = { version = "0.4.4", optional = true }
|
2020-05-18 10:24:26 +02:00
|
|
|
serde = { version = "1.0.103", features = ["derive"], optional = true }
|
2018-09-10 19:24:31 +01:00
|
|
|
|
|
|
|
[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"
|
2018-09-10 19:24:31 +01:00
|
|
|
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]
|
2019-02-04 10:46:43 +00:00
|
|
|
# Used for fork protection (reseeding.rs)
|
2020-01-08 14:46:14 +00:00
|
|
|
libc = { version = "0.2.22", optional = true, default-features = false }
|
2018-03-28 20:19:21 +02:00
|
|
|
|
2019-05-20 15:19:03 +01:00
|
|
|
# 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 }
|
2019-05-20 15:19:03 +01:00
|
|
|
[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 }
|
2019-05-20 15:19:03 +01:00
|
|
|
|
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" }
|
2020-05-18 10:24:26 +02:00
|
|
|
# Only to test serde1
|
|
|
|
bincode = "1.2.1"
|
2018-07-24 18:45:08 +02:00
|
|
|
|
2018-04-02 09:36:40 +02:00
|
|
|
[package.metadata.docs.rs]
|
2020-08-27 10:20:28 +01:00
|
|
|
# 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
|
2020-08-27 10:20:28 +01:00
|
|
|
rustdoc-args = ["--cfg", "doc_cfg"]
|