Rust - Installation notes
Branch: master
Clone or download
Pull request Compare This branch is 2 commits behind loganmzz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Cargo.toml
LISEZMOI.md
README.md

README.md

🇫🇷 Pour les instructions en français, veuillez consulter LISEZMOI.md

Installing Rust

Standard procedure

At the time of writing, the easiest way is to use rustup.

Note: under Windows, you will have to choose between two options. For gnu, you need nothing special ; rustup will automatically install GNU compiler tools. For msvc, you need to install Visual C++ Build Tools 2015 ; click here for more details.

Docker

If you don't want to install Rust on your local machine, you can use Docker:

alias cargo='docker run --rm --tty --user $(id -u) --volume $(pwd):$(pwd) --workdir $(pwd) -e "USER=$(id -un)" loganmzz/rust cargo test'

cargo new foobar
cargo run

Note: If you want a specific version, please consult available image tags. Also, remember to update latest with docker pull loganmzz/rust.

Verification

To check your installation, just run cargo run from repository root directory. It should prints

Congrulations !
You have compiled and run your first Rust program

Installing editor

IntelliJ IDEA

Note: you can also use other IntelliJ-based products. But IntelliJ IDEA has a community version.

IntelliJ Rust is the official plug-ins. Firstly, started as side projects from JetBrains employees. Since summer 2017, it is officially supported by JetBrains.

Visual Studio Code

Rust (rls) is currently the recommended extension. It is provided by Rust Developer Tools team (whih also provides Rust Language Server).

There is also Rust but it's not actively developped. In this case, using RLS mode is highly recommanded.

Others

You can find more supported IDEs at Are we (I)DE yet?.