Rust Installation

Install Rust⮳.

Install Rust and Create a First Project

On WSL / Unix:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Check whether you have Rust installed correctly.
rustc --version
cargo --version
  • Open the documentation, if needed.
rustup doc
  • Create a new project.
cargo new hello_world
cd hello_world
code . # open VS Code (or your favorite editor) and edit the code as you wish
  • Build / run the code.
cargo check # check if the code can compile
cargo build # compile
cargo run # run the executable

cargo run builds the code if cargo build has not been invoked before or the code has changed.