- Rust Programming Cookbook
- Claus Matzinger
- 67字
- 2021-06-24 12:27:50
Getting ready
First, create a new project using cargo new iteration --lib and add the following to the newly created Cargo.toml file in the project's directory:
[dev-dependencies]
rand = "^0.5"
This adds a dependency to the rand (https://github.com/rust-random/rand) crate to the project, which will be installed upon running cargo test the first time. Open the entire project (or the src/lib.rs file) in Visual Studio Code.