blob: 98ba373c68f8be6a8a1327b61b510379f70d8c37 [file] [log] [blame]
Joel Galenson66036a82020-07-07 13:29:38 -07001[package]
2name = "rand"
David LeGaree63a6332022-03-02 16:21:18 +00003version = "0.8.5"
Joel Galenson66036a82020-07-07 13:29:38 -07004authors = ["The Rand Project Developers", "The Rust Project Developers"]
5license = "MIT OR Apache-2.0"
6readme = "README.md"
7repository = "https://github.com/rust-random/rand"
Haibo Huang8f9af982020-12-22 18:16:37 -08008documentation = "https://docs.rs/rand"
9homepage = "https://rust-random.github.io/book"
Joel Galenson66036a82020-07-07 13:29:38 -070010description = """
11Random number generators and other randomness functionality.
12"""
13keywords = ["random", "rng"]
14categories = ["algorithms", "no-std"]
Joel Galenson66036a82020-07-07 13:29:38 -070015autobenches = true
16edition = "2018"
Haibo Huang8f9af982020-12-22 18:16:37 -080017include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
Joel Galenson66036a82020-07-07 13:29:38 -070018
David LeGaree63a6332022-03-02 16:21:18 +000019[package.metadata.docs.rs]
20# To build locally:
21# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
22all-features = true
23rustdoc-args = ["--cfg", "doc_cfg"]
24
25[package.metadata.playground]
26features = ["small_rng", "serde1"]
27
Joel Galenson66036a82020-07-07 13:29:38 -070028[features]
29# Meta-features:
Haibo Huang8f9af982020-12-22 18:16:37 -080030default = ["std", "std_rng"]
31nightly = [] # enables performance optimizations requiring nightly rust
Joel Galensone03dd302021-06-21 13:51:31 -070032serde1 = ["serde", "rand_core/serde1"]
Joel Galenson66036a82020-07-07 13:29:38 -070033
Haibo Huang8f9af982020-12-22 18:16:37 -080034# Option (enabled by default): without "std" rand uses libcore; this option
35# enables functionality expected to be available on a standard platform.
Joel Galenson66036a82020-07-07 13:29:38 -070036std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom", "libc"]
Joel Galenson66036a82020-07-07 13:29:38 -070037
Haibo Huang8f9af982020-12-22 18:16:37 -080038# Option: "alloc" enables support for Vec and Box when not using "std"
39alloc = ["rand_core/alloc"]
40
41# Option: use getrandom package for seeding
42getrandom = ["rand_core/getrandom"]
43
44# Option (requires nightly): experimental SIMD support
45simd_support = ["packed_simd"]
46
47# Option (enabled by default): enable StdRng
David LeGaree63a6332022-03-02 16:21:18 +000048std_rng = ["rand_chacha"]
Haibo Huang8f9af982020-12-22 18:16:37 -080049
50# Option: enable SmallRng
51small_rng = []
Joel Galenson66036a82020-07-07 13:29:38 -070052
Joel Galensone03dd302021-06-21 13:51:31 -070053# Option: for rustc ≥ 1.51, enable generating random arrays of any size
54# using min-const-generics
55min_const_gen = []
56
Joel Galenson66036a82020-07-07 13:29:38 -070057[workspace]
58members = [
59 "rand_core",
60 "rand_distr",
61 "rand_chacha",
Joel Galenson66036a82020-07-07 13:29:38 -070062 "rand_pcg",
Joel Galenson66036a82020-07-07 13:29:38 -070063]
64
65[dependencies]
Haibo Huang8f9af982020-12-22 18:16:37 -080066rand_core = { path = "rand_core", version = "0.6.0" }
Joel Galenson66036a82020-07-07 13:29:38 -070067log = { version = "0.4.4", optional = true }
Haibo Huang8f9af982020-12-22 18:16:37 -080068serde = { version = "1.0.103", features = ["derive"], optional = true }
David LeGaree63a6332022-03-02 16:21:18 +000069rand_chacha = { path = "rand_chacha", version = "0.3.0", default-features = false, optional = true }
Joel Galenson66036a82020-07-07 13:29:38 -070070
71[dependencies.packed_simd]
72# NOTE: so far no version works reliably due to dependence on unstable features
Haibo Huang8f9af982020-12-22 18:16:37 -080073package = "packed_simd_2"
David LeGaree63a6332022-03-02 16:21:18 +000074version = "0.3.7"
Joel Galenson66036a82020-07-07 13:29:38 -070075optional = true
76features = ["into_bits"]
77
78[target.'cfg(unix)'.dependencies]
79# Used for fork protection (reseeding.rs)
80libc = { version = "0.2.22", optional = true, default-features = false }
81
Joel Galenson66036a82020-07-07 13:29:38 -070082[dev-dependencies]
Haibo Huang8f9af982020-12-22 18:16:37 -080083rand_pcg = { path = "rand_pcg", version = "0.3.0" }
Haibo Huang8f9af982020-12-22 18:16:37 -080084# Only to test serde1
85bincode = "1.2.1"