🇫🇷 Pour les instructions en français, veuillez consulter LISEZMOI.md
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.
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
.
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
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.
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.
You can find more supported IDEs at Are we (I)DE yet?.