Today I spent more time than I should have trying to figure out why my project wasn't building, only to find out that I forgot to include the following crate:
[dependencies]
glob = "~0.3.0"
I'd like to avoid making this mistake again by having Cargo add the name/version of a package to the [dependencies]
section of my Cargo.toml
file when I install the package.
To give you a better example of what I mean, in NPM
if you run:
npm install --save-dev glob
It'd save the name/version of the glob
package to dependencies
section of the package.json
file.
How do I do this in Cargo?