I expected there to be something like cargo install stopwatch but could not find it in the docs.
I've been finding the package version and manually adding it to Cargo.toml:
[dependencies]
stopwatch = "0.0.6"
But this is tedious and I feel it should be more automated.
As of Rust 1.62.0, there is a built-in add sub-command to add dependencies and avoid having to edit the Cargo.toml file yourself.
To add the latest version:
cargo add stopwatch
To add a specific version:
cargo add [email protected]
More details in the Cargo book.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With