1.1. Installation#

The rustup installer and version management tool is the best way to download, install, and maintain the rust programming environment. Using the rustup command after installation will help you check for updates and update your Rust environment when necessary.

Depending on your operating system, you can install rustup by following the instructions below:

Enter the following command in terminal:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

We recommend working with the Windows Subsystem for Linux (WSL) to install Rust on Windows. Please follow the instructions from Microsoft.

Once you have WSL installed, open a WSL terminal and enter the following command:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Warning

If you are unable to use WSL, you can install Rust directly on Windows by following the instructions on the Rust website. Our recommendation is to use WSL, as it will provide a more consistent experience with the rest of the guide.

1.1.1. Update existing Rust environment#

You can run:

rustc --version

to both check if you already have Rust installed, and if so, which version. If you don’t have it installed, go above and follow the instructions to install it. If you already have a Rust environment installed, then you can update the version by doing:

rustup update

1.1.2. Rust Playground#

The Rust Playground is a web interface to try out small code snippets