4 releases
| 0.1.3 | Dec 26, 2019 |
|---|---|
| 0.1.2 | Dec 8, 2019 |
| 0.1.1 | Dec 8, 2019 |
| 0.1.0 | Dec 8, 2019 |
#216 in #wasi
96 downloads per month
3KB
A super simple implementation of a Random Number Generator for WASI. Implements [RngCore] and [CryptoRng] by using [random_get] to try_fill_bytes.
use rand_core::RngCore;
use wasi_rng::WasiRng;
let mut rng = WasiRng;
println!("random number: {}", rng.next_u32());
wasi-rng
A super simple implementation of a Random Number Generator for WASI.
Implements RngCore and CryptoRng by using random_get to
try_fill_bytes.
use rand_core::RngCore;
use wasi_rng::WasiRng;
let mut rng = WasiRng;
println!("random number: {}", rng.next_u32());
License: MIT
Dependencies
~58KB