3 ms·
A lot of what you might find in the standard library of other languages is offloaded to crates, by design in order to keep the core Rust footprint small. For r
by Communitivity 7y ago
A lot of what you might find in the standard library of other languages is offloaded to crates, by design in order to keep the core Rust footprint small.
For random numbers, there is the rand crate, described here in the Rust Cookbook:
https://rust-lang-nursery.github.io/rust-cookbook/algorithms/randomness.html https://rust-lang-nursery.github.io/rust-cookbook/algorithms...
- baby 7y agoThe problem is that it is easy to trust standard libraries, but third party dependencies? For something basic you’d think rust could have included that in their std. It makes no sense to call a third party, and maybe a broken one, when you want to generate a random number. The worst part about rust is its standard library and thats not a secret.