First, you must install Rust in your machine, which comes with Cargo. (Installing Rust with rustc
will also install Cargo.)
cargo new my_package
cd my_package
cargo build
cargo run
Edit Cargo.toml
and add your package dependencies.
// Cargo.toml
[dependencies]
base64 = "0.21.7"
You can browse Cargo packages at crates.io.
See how to compile and run Rust programs without Cargo.