Joel Galenson | 66036a8 | 2020-07-07 13:29:38 -0700 | [diff] [blame] | 1 | [package] |
| 2 | name = "rand" |
| 3 | version = "0.7.3" |
| 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://rust-random.github.io/rand/" |
| 9 | homepage = "https://crates.io/crates/rand" |
| 10 | description = """ |
| 11 | Random number generators and other randomness functionality. |
| 12 | """ |
| 13 | keywords = ["random", "rng"] |
| 14 | categories = ["algorithms", "no-std"] |
| 15 | exclude = ["/utils/*", "/.travis.yml", "/appveyor.yml", ".gitignore"] |
| 16 | autobenches = true |
| 17 | edition = "2018" |
| 18 | |
| 19 | [badges] |
| 20 | travis-ci = { repository = "rust-random/rand" } |
| 21 | appveyor = { repository = "rust-random/rand" } |
| 22 | |
| 23 | [features] |
| 24 | # Meta-features: |
| 25 | default = ["std"] # without "std" rand uses libcore |
| 26 | nightly = ["simd_support"] # enables all features requiring nightly rust |
| 27 | serde1 = [] # does nothing, deprecated |
| 28 | |
| 29 | # Optional dependencies: |
| 30 | std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom", "libc"] |
| 31 | alloc = ["rand_core/alloc"] # enables Vec and Box support (without std) |
| 32 | # re-export optional WASM dependencies to avoid breakage: |
| 33 | # Warning: wasm-bindgen and stdweb features will be removed in rand 0.8; |
| 34 | # recommended to activate via the getrandom crate instead. |
| 35 | wasm-bindgen = ["getrandom_package/wasm-bindgen"] |
| 36 | stdweb = ["getrandom_package/stdweb"] |
| 37 | getrandom = ["getrandom_package", "rand_core/getrandom"] |
| 38 | |
| 39 | # Configuration: |
| 40 | simd_support = ["packed_simd"] # enables SIMD support |
| 41 | small_rng = ["rand_pcg"] # enables SmallRng |
| 42 | |
| 43 | [workspace] |
| 44 | members = [ |
| 45 | "rand_core", |
| 46 | "rand_distr", |
| 47 | "rand_chacha", |
| 48 | "rand_hc", |
| 49 | "rand_pcg", |
| 50 | "tests/wasm_bindgen", |
| 51 | ] |
| 52 | |
| 53 | [dependencies] |
| 54 | rand_core = { path = "rand_core", version = "0.5.1" } |
| 55 | rand_pcg = { path = "rand_pcg", version = "0.2", optional = true } |
| 56 | # Do not depend on 'getrandom_package' directly; use the 'getrandom' feature! |
| 57 | # This is a dependency because: we forward wasm feature flags |
| 58 | # This is renamed because: we need getrandom to depend on rand_core/getrandom |
| 59 | getrandom_package = { version = "0.1.1", package = "getrandom", optional = true } |
| 60 | log = { version = "0.4.4", optional = true } |
| 61 | |
| 62 | [dependencies.packed_simd] |
| 63 | # NOTE: so far no version works reliably due to dependence on unstable features |
| 64 | version = "0.3" |
| 65 | # git = "https://github.com/rust-lang-nursery/packed_simd" |
| 66 | optional = true |
| 67 | features = ["into_bits"] |
| 68 | |
| 69 | [target.'cfg(unix)'.dependencies] |
| 70 | # Used for fork protection (reseeding.rs) |
| 71 | libc = { version = "0.2.22", optional = true, default-features = false } |
| 72 | |
| 73 | # Emscripten does not support 128-bit integers, which are used by ChaCha code. |
| 74 | # We work around this by using a different RNG. |
| 75 | [target.'cfg(not(target_os = "emscripten"))'.dependencies] |
| 76 | rand_chacha = { path = "rand_chacha", version = "0.2.1", default-features = false } |
| 77 | [target.'cfg(target_os = "emscripten")'.dependencies] |
| 78 | rand_hc = { path = "rand_hc", version = "0.2" } |
| 79 | |
| 80 | [dev-dependencies] |
| 81 | rand_pcg = { path = "rand_pcg", version = "0.2" } |
| 82 | # Only for benches: |
| 83 | rand_hc = { path = "rand_hc", version = "0.2" } |
| 84 | |
| 85 | [package.metadata.docs.rs] |
| 86 | all-features = true |