To get started with Rust you obviously have to set up your environment.
There is a short guide to do this:
Windows:
- First of all, you need to install rustup, which is a Rust installer and version management tool.
- You may also need to install the Visual Studio C++ Build tools if you don’t have one, cause it’s mandatory for running the Rust program on Windows.
- After the rustup installation is complete you’ll also get the latest stable version of the Rust build tool and package manager -
Cargo
, which will help you to build, run and test your projects. - To ensure that Rust and Cargo are installed correctly - run
cargo --version
in your terminal of choice.
Linux/Mac:
- To install rustup on Linux or macOS, open a terminal and enter the following command
curl https://sh.rustup.rs -sSf | sh
- Once the Rust installation is complete, the Cargo’s bin directory (
~/.cargo/bin
– where all tools are installed) will be added in your PATH environment variable, in~/.profile
.
⚡ To get a more detailed description or other methods of setting up Rust environment - go to our list of setup materials.