1 | [package] |
2 | name = "rand" |
3 | version = "0.9.0" |
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 = "2021" |
17 | rust-version = "1.63" |
18 | include = ["src/" , "LICENSE-*" , "README.md" , "CHANGELOG.md" , "COPYRIGHT" ] |
19 | |
20 | [package.metadata.docs.rs] |
21 | # To build locally: |
22 | # RUSTDOCFLAGS="--cfg docsrs -Zunstable-options --generate-link-to-definition" cargo +nightly doc --all --all-features --no-deps --open |
23 | all-features = true |
24 | rustdoc-args = ["--generate-link-to-definition" ] |
25 | |
26 | [package.metadata.playground] |
27 | features = ["small_rng" , "serde" ] |
28 | |
29 | [features] |
30 | # Meta-features: |
31 | default = ["std" , "std_rng" , "os_rng" , "small_rng" , "thread_rng" ] |
32 | nightly = [] # some additions requiring nightly Rust |
33 | serde = ["dep:serde" , "rand_core/serde" ] |
34 | |
35 | # Option (enabled by default): without "std" rand uses libcore; this option |
36 | # enables functionality expected to be available on a standard platform. |
37 | std = ["rand_core/std" , "rand_chacha?/std" , "alloc" ] |
38 | |
39 | # Option: "alloc" enables support for Vec and Box when not using "std" |
40 | alloc = [] |
41 | |
42 | # Option: enable OsRng |
43 | os_rng = ["rand_core/os_rng" ] |
44 | |
45 | # Option (requires nightly Rust): experimental SIMD support |
46 | simd_support = ["zerocopy/simd-nightly" ] |
47 | |
48 | # Option (enabled by default): enable StdRng |
49 | std_rng = ["dep:rand_chacha" ] |
50 | |
51 | # Option: enable SmallRng |
52 | small_rng = [] |
53 | |
54 | # Option: enable ThreadRng and rng() |
55 | thread_rng = ["std" , "std_rng" , "os_rng" ] |
56 | |
57 | # Option: use unbiased sampling for algorithms supporting this option: Uniform distribution. |
58 | # By default, bias affecting no more than one in 2^48 samples is accepted. |
59 | # Note: enabling this option is expected to affect reproducibility of results. |
60 | unbiased = [] |
61 | |
62 | # Option: enable logging |
63 | log = ["dep:log" ] |
64 | |
65 | [workspace] |
66 | members = [ |
67 | "rand_core" , |
68 | "rand_distr" , |
69 | "rand_chacha" , |
70 | "rand_pcg" , |
71 | ] |
72 | exclude = ["benches" , "distr_test" ] |
73 | |
74 | [dependencies] |
75 | rand_core = { path = "rand_core" , version = "0.9.0" , default-features = false } |
76 | log = { version = "0.4.4" , optional = true } |
77 | serde = { version = "1.0.103" , features = ["derive" ], optional = true } |
78 | rand_chacha = { path = "rand_chacha" , version = "0.9.0" , default-features = false, optional = true } |
79 | zerocopy = { version = "0.8.0" , default-features = false, features = ["simd" ] } |
80 | |
81 | [dev-dependencies] |
82 | rand_pcg = { path = "rand_pcg" , version = "0.9.0" } |
83 | # Only to test serde |
84 | bincode = "1.2.1" |
85 | rayon = "1.7" |
86 | |