Rust Programming Tutorial #32 – Random Numbers (and Booleans)
13.5K views on YouTube
In order to use random numbers in Rust, you need to use the external ‘rand’ crate which you can list in your Cargo.toml file.
From there, you can use a random number generator in order to gain access to many provided methods including ones that can give you a random number within a range and also random boolean values.
If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!