Introduction
In this lab, the concept of development dependencies is explained. Development dependencies are added in the [dev-dependencies]
section of the Cargo.toml
file and are used for tests, examples, or benchmarks. An example of a development dependency is pretty_assertions
, which extends standard macros like assert_eq!
and assert_ne!
to provide colorful diffs.
Note: If the lab does not specify a file name, you can use any file name you want. For example, you can use
main.rs
, compile and run it withrustc main.rs && ./main
.