-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
93 lines (79 loc) · 2.28 KB
/
Cargo.toml
File metadata and controls
93 lines (79 loc) · 2.28 KB
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
91
92
93
[package]
name = "clock-rand"
version = "1.0.2"
edition = "2024"
authors = ["Olyntar Labs <labs@olyntar.com>"]
description = "Next-generation random number generation with blockchain-aware RNGs, fork detection, and cryptographic security"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Olyntar-Labs/clock-rand"
documentation = "https://docs.rs/clock-rand"
keywords = ["rng", "random", "blockchain", "crypto", "cryptography"]
categories = ["algorithms", "cryptography", "no-std", "science"]
[lib]
name = "clock_rand"
path = "src/lib.rs"
[features]
default = ["std", "fast_rng"]
std = []
no_std = []
# RNG type features
fast_rng = []
crypto_rng = ["dep:blake3", "dep:chacha20", "dep:aes"]
custom_rng = ["crypto_rng", "fast_rng"]
distributions = []
# Optional features
thread_safe = ["std"]
fork_safe = []
serde = ["dep:serde", "dep:serde_json", "serde/derive"]
security = ["zeroize"]
wasm = ["wasm-bindgen"]
wasm_crypto = ["wasm", "dep:js-sys", "dep:web-sys"]
simd = []
aes = []
# Dependencies for crypto RNGs
[dependencies]
# Crypto primitives (only for crypto_rng feature)
blake3 = { version = "1.8.3", optional = true }
chacha20 = { version = "0.9.1", optional = true }
aes = { version = "0.8.4", optional = true }
# Optional dependencies
serde = { version = "1.0.228", optional = true, features = ["derive"] }
serde_json = { version = "1.0.149", optional = true }
zeroize = { version = "1.8.2", optional = true, features = ["zeroize_derive"] }
wasm-bindgen = { version = "0.2.106", optional = true }
rand_core = "0.9.4"
# WASM-specific dependencies for crypto
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = { version = "0.3", optional = true }
web-sys = { version = "0.3", optional = true, features = [
"Crypto",
"Window",
"console",
] }
[dev-dependencies]
criterion = { version = "0.8.1", features = ["html_reports"] }
proptest = "1.9.0"
quickcheck = "1.0.3"
rand = "0.9.2"
rand_pcg = "0.9.0"
rand_xoshiro = "0.7.0"
rand_chacha = "0.9.0"
# Performance benchmarks
[[bench]]
name = "fast_rng"
harness = false
[[bench]]
name = "crypto_rng"
harness = false
required-features = ["crypto_rng", "custom_rng"]
[[bench]]
name = "comparison"
harness = false
required-features = ["crypto_rng"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
[profile.dev]
opt-level = 0
debug = true