Random Numbers in Rust
Here’s the translation of the Go code to Rust, with explanations in Markdown format suitable for Hugo:
Rust’s rand
crate provides pseudorandom number generation.
To run this program, you’ll need to add the rand
crate to your Cargo.toml
file:
Then you can run the program using Cargo:
Some of the generated numbers may be different when you run the sample.
See the rand
crate documentation for references on other random quantities that Rust can provide.