[package]
name = "clock-rand"
version = "1.0.3"
edition = "2024"
authors = ["ClockInChain <labs@clockinchain.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/clockinchain/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 = []
fast_rng = []
crypto_rng = ["dep:blake3", "dep:chacha20", "dep:aes"]
custom_rng = ["crypto_rng", "fast_rng"]
distributions = []
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]
blake3 = { version = "1.8.3", optional = true }
chacha20 = { version = "0.9.1", optional = true }
aes = { version = "0.8.4", optional = true }
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"
[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"
[[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