[0]: https://doc.rust-lang.org/std/collections/hash_map/struct.Ra...
[1]: https://docs.rs/rand/0.7.0/rand/rngs/struct.ThreadRng.html
Javascript's Math.random and Crypto.getRandomValues works this way.
I get that security people don't want non-secure RNGs to exist out of fear that someone might try implement security related functions out of them but why should I care if I just want to choose between 3 types of enemies this wave?
What is far better and faster than SHA3?
And while SHA2 wasn't designed for that use, it's easy to make simple and provably correct constructs that turn a secure hash into a secure RNG.
I would definitely not want my std to be designed this way.
2. You definitely don't want your std to be designed with a simple API to a fast, secure, and popular crypto primitive? Pretend I named your favorite one, to avoid bikeshedding issues.
Are you suggesting including the core `rand` crate with some traits and a basic pseudo-random generator in the stdlib, and allowing other crates to use those traits to implement the many other[1] RNGs?
I'm honestly not sure this is a good idea, it seems the rand crate has undergone a few iterations, crystalizing this inside the stdlib might lead to problems?
1. https://rust-random.github.io/book/guide-rngs.html