3 ms·
What do you miss in the standard library? Fwiw, Rust attempts, by design, to not be batteries included, as this would tie Rust to specific architectures, or op
by Yoric 7y ago
What do you miss in the standard library?
Fwiw, Rust attempts, by design, to not be batteries included, as this would tie Rust to specific architectures, or operating systems – or even require Rust code to run on an operating system, which doesn't have to be the case.
So, yeah, as a Rust dev, I pretty much always rely upon external crates. But hey, that's what they're here for :)
- saagarjha 7y agoWhen I was playing with Rust a while back, I recall there being no easy to generate a random number in the standard library.
- Communitivity 7y agoA 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.
- baby 7y agorand is the first thing that comes to mind, json parser, any crypto, etc. Take a look at the golang standard library.