forked from rust-random/rand
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCargo.toml
90 lines (79 loc) · 3.35 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[package]
name = "rand"
version = "0.7.3"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-random/rand"
documentation = "https://rust-random.github.io/rand/"
homepage = "https://crates.io/crates/rand"
description = """
Random number generators and other randomness functionality.
"""
keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]
exclude = ["/utils/*", "/.travis.yml", "/appveyor.yml", ".gitignore", "/sgx/*"]
autobenches = true
edition = "2018"
[badges]
travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }
[features]
default = ["std", "mesalock_sgx"] # without "std" rand uses libcore
# Meta-features:
nightly = ["simd_support"] # enables all features requiring nightly rust
serde1 = [] # does nothing, deprecated
# Optional dependencies:
std = ["rand_core/std", "rand_core/mesalock_sgx", "rand_chacha/std", "rand_chacha/mesalock_sgx", "alloc", "getrandom"]
alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
# re-export optional WASM dependencies to avoid breakage:
# Warning: wasm-bindgen and stdweb features will be removed in rand 0.8;
# recommended to activate via the getrandom crate instead.
#wasm-bindgen = ["getrandom_package/wasm-bindgen"]
#stdweb = ["getrandom_package/stdweb"]
getrandom = ["getrandom_package", "rand_core/getrandom"]
mesalock_sgx = ["sgx_tstd"]
# Configuration:
simd_support = ["packed_simd"] # enables SIMD support
small_rng = ["rand_pcg"] # enables SmallRng
[workspace]
members = [
"rand_core",
"rand_distr",
"rand_chacha",
"rand_hc",
"rand_pcg",
#"tests/wasm_bindgen",
]
[dependencies]
rand_core = { path = "rand_core", version = "0.5.1" }
rand_pcg = { path = "rand_pcg", version = "0.2", optional = true }
# Do not depend on 'getrandom_package' directly; use the 'getrandom' feature!
# This is a dependency because: we forward wasm feature flags
# This is renamed because: we need getrandom to depend on rand_core/getrandom
getrandom_package = { git = "https://github.com/mesalock-linux/getrandom-sgx", package = "getrandom", optional = true }
log = { git = "https://github.com/mesalock-linux/log-sgx", optional = true }
sgx_tstd = { version = "1.0", rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }
[dependencies.packed_simd]
# NOTE: so far no version works reliably due to dependence on unstable features
package = "packed_simd_2"
version = "0.3.4"
# git = "https://github.com/rust-lang-nursery/packed_simd"
optional = true
features = ["into_bits"]
[target.'cfg(unix)'.dependencies]
# Used for fork protection (reseeding.rs)
# SGX does not provide fork. No need for fork protection
#libc = { version = "0.2.22", optional = true, default-features = false }
# Emscripten does not support 128-bit integers, which are used by ChaCha code.
# We work around this by using a different RNG.
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
rand_chacha = { path = "rand_chacha", version = "0.2.1", default-features = false }
#[target.'cfg(target_os = "emscripten")'.dependencies]
#rand_hc = { path = "rand_hc", version = "0.2" }
[dev-dependencies]
#rand_pcg = { path = "rand_pcg", version = "0.2" }
# Only for benches:
#rand_hc = { path = "rand_hc", version = "0.2" }
[package.metadata.docs.rs]
all-features = true