1[package] 2name = "rand" 3version = "0.8.5" 4authors = ["The Rand Project Developers", "The Rust Project Developers"] 5license = "MIT OR Apache-2.0" 6readme = "README.md" 7repository = "https://github.com/rust-random/rand" 8documentation = "https://docs.rs/rand" 9homepage = "https://rust-random.github.io/book" 10description = """ 11Random number generators and other randomness functionality. 12""" 13keywords = ["random", "rng"] 14categories = ["algorithms", "no-std"] 15autobenches = true 16edition = "2018" 17include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] 18 19[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 28[features] 29# Meta-features: 30default = ["std", "std_rng"] 31nightly = [] # enables performance optimizations requiring nightly rust 32serde1 = ["serde", "rand_core/serde1"] 33 34# Option (enabled by default): without "std" rand uses libcore; this option 35# enables functionality expected to be available on a standard platform. 36std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom", "libc"] 37 38# 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 48std_rng = ["rand_chacha"] 49 50# Option: enable SmallRng 51small_rng = [] 52 53# Option: for rustc ≥ 1.51, enable generating random arrays of any size 54# using min-const-generics 55min_const_gen = [] 56 57[workspace] 58members = [ 59 "rand_core", 60 "rand_distr", 61 "rand_chacha", 62 "rand_pcg", 63] 64 65[dependencies] 66rand_core = { path = "rand_core", version = "0.6.0" } 67log = { version = "0.4.4", optional = true } 68serde = { version = "1.0.103", features = ["derive"], optional = true } 69rand_chacha = { path = "rand_chacha", version = "0.3.0", default-features = false, optional = true } 70 71[dependencies.packed_simd] 72# NOTE: so far no version works reliably due to dependence on unstable features 73package = "packed_simd_2" 74version = "0.3.7" 75optional = 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 82[dev-dependencies] 83rand_pcg = { path = "rand_pcg", version = "0.3.0" } 84# Only to test serde1 85bincode = "1.2.1" 86