| Crates.io | wasm-random |
| lib.rs | wasm-random |
| version | 0.1.1 |
| created_at | 2025-11-28 06:09:33.479753+00 |
| updated_at | 2025-11-29 03:08:42.763104+00 |
| description | WASM-friendly random number generation. |
| homepage | |
| repository | https://github.com/exquisiteOntologist/wasm-random |
| max_upload_size | |
| id | 1954901 |
| size | 9,800 |
Simple WebAssembly random number generator.
A selection of random number libraries are available; however, few of those libraries are compatible with WASM. This library is designed to be simple and easy to use with WASM.
This library does not depend on any system-specific features, making it compatible with a wide range of environments including WASM (wasm32-unknown-unknown).
let random_number = wasm_random::random();
let random_number = wasm_random::random_from_range(100., 300.);
There are also ..._f64 variants of these functions (the default are f32).