As I stated before, cargo is a a friendly wrapper around rustc with some very helpful features added on, It works a lot like npm.

Dependency Management

When you build using cargo it will download all of the required dependencies you have defined in a file named Cargo.toml. You can find these "crates" (Rust's name for packages) at crates.io

Cargo.toml

[package]
name = "wasm_tutorial"
version = "0.1.0"
authors = ["robert masen <r@robertmasen.pizza>"]

[dependencies]
clap = "*"
byteorder = "1.2.2"

[target.win32.dependencies]
winapi = "=0.3.4"

[dev-dependencies]
wasm-bindgen-cli = "0.2"

Not much different than a package.json.

The main difference is that it uses a language called TOML. TOML is not much different from JSON, object are described by using the object's name in brackets [package] and if you need additional nesting you can use . notation to go deeper, [target.win32.dependencies]. Below the name, the properties are 1 on each line with the key and value separated by an equal sign clap = "*". There is a lot more that you can do but that will at least get you started.

Utility Management

You can install programs published to crates.io for use from the command line.

$ cargo install wasm-bindgen-cli
...
wasm-bindgen-cli
...

not much different than npm i -g typescript