The easiest way to get Cargo is to install the current stable release of Rust
rustup. Installing Rust using
rustup will also install
On Linux and macOS systems, this is done as follows:
curl https://sh.rustup.rs -sSf | sh
It will download a script, and start the installation. If everything goes well, you’ll see this appear:
Rust is installed now. Great!
On Windows, download and run rustup-init.exe. It will start the installation in a console and present the above message on success.
After this, you can use the
rustup command to also install
channels for Rust and Cargo.
For other installation options and information, visit the install page of the Rust website.
Alternatively, you can build Cargo from source.