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