1 | [package] |
2 | name = "rand" |
3 | version = "0.8.5" |
4 | authors = ["The Rand Project Developers" , "The Rust Project Developers" ] |
5 | license = "MIT OR Apache-2.0" |
6 | readme = "README.md" |
7 | repository = "https://github.com/rust-random/rand" |
8 | documentation = "https://docs.rs/rand" |
9 | homepage = "https://rust-random.github.io/book" |
10 | description = "" " |
11 | Random number generators and other randomness functionality. |
12 | " "" |
13 | keywords = ["random" , "rng" ] |
14 | categories = ["algorithms" , "no-std" ] |
15 | autobenches = true |
16 | edition = "2018" |
17 | include = ["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 |
22 | all-features = true |
23 | rustdoc-args = ["--cfg" , "doc_cfg" ] |
24 | |
25 | [package.metadata.playground] |
26 | features = ["small_rng" , "serde1" ] |
27 | |
28 | [features] |
29 | # Meta-features: |
30 | default = ["std" , "std_rng" ] |
31 | nightly = [] # enables performance optimizations requiring nightly rust |
32 | serde1 = ["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. |
36 | std = ["rand_core/std" , "rand_chacha/std" , "alloc" , "getrandom" , "libc" ] |
37 | |
38 | # Option: "alloc" enables support for Vec and Box when not using "std" |
39 | alloc = ["rand_core/alloc" ] |
40 | |
41 | # Option: use getrandom package for seeding |
42 | getrandom = ["rand_core/getrandom" ] |
43 | |
44 | # Option (requires nightly): experimental SIMD support |
45 | simd_support = ["packed_simd" ] |
46 | |
47 | # Option (enabled by default): enable StdRng |
48 | std_rng = ["rand_chacha" ] |
49 | |
50 | # Option: enable SmallRng |
51 | small_rng = [] |
52 | |
53 | # Option: for rustc ≥ 1.51, enable generating random arrays of any size |
54 | # using min-const-generics |
55 | min_const_gen = [] |
56 | |
57 | [workspace] |
58 | members = [ |
59 | "rand_core" , |
60 | "rand_distr" , |
61 | "rand_chacha" , |
62 | "rand_pcg" , |
63 | ] |
64 | |
65 | [dependencies] |
66 | rand_core = { path = "rand_core" , version = "0.6.0" } |
67 | log = { version = "0.4.4" , optional = true } |
68 | serde = { version = "1.0.103" , features = ["derive" ], optional = true } |
69 | rand_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 |
73 | package = "packed_simd_2" |
74 | version = "0.3.7" |
75 | optional = true |
76 | features = ["into_bits" ] |
77 | |
78 | [target.'cfg(unix)'.dependencies] |
79 | # Used for fork protection (reseeding.rs) |
80 | libc = { version = "0.2.22" , optional = true, default-features = false } |
81 | |
82 | [dev-dependencies] |
83 | rand_pcg = { path = "rand_pcg" , version = "0.3.0" } |
84 | # Only to test serde1 |
85 | bincode = "1.2.1" |
86 | |