Installing Rust
Rust is a compiled language and its compiler is called the Rust compiler (rustc). Rust also has its own package manager, called Cargo. Cargo is similar to npm for Node.js. Cargo downloads package dependencies and builds, compiles, packs, and uploads the artifacts into crates (Rust's version of packages).
The Rust language provides an easy way to install and manage Rust via rustup
. rustup
helps to install, update, and remove rustc
, Cargo, and rustup
itself. It makes it easy to install and manage various versions of Rust.
Let's install Rust using the rustup
tool and see how we can manage Rust versions using rustup
.
In Linux or macOS, use the following command:
$ curl https://sh.rustup.rs --sSf | sh
The script will download and install the Rust language. Both rustc
and Cargo are installed in ~/.cargo/bin
and delegate any access to the underlying toolchain.
For Windows, download and install the binaries from here: https://forge.rust-lang.org...