Installation - The Cargo Book (original) (raw)
Keyboard shortcuts
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
The Cargo Book
Installation
Install Rust and Cargo
The easiest way to get Cargo is to install the current stable release of Rustby using rustup. Installing Rust using rustup will also install cargo.
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 beta or nightlychannels for Rust and Cargo.
For other installation options and information, visit theinstall page of the Rust website.
Build and Install Cargo from Source
Alternatively, you can build Cargo from source.