Cargo install package doesn't showup on toml file?

I installed cargo-watch with the command below

cargo install cargo-watch

But when i open the toml file, it doesn't show up at the dependencies section

You want cargo add.

The cargo install command is for something else.

2 Likes

Do you know whats the difference between cargo install vs cargo add?

https://doc.rust-lang.org/cargo/commands/cargo-install.html

https://doc.rust-lang.org/cargo/commands/cargo-add.html

1 Like

cargo add manages dependencies in your Cargo.toml.

cargo install dumps executable files to ~/.cargo/bin. They are not dependencies. They don't even update. It's a quick'n'dirty tool for getting development tools.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.