Let’s set up our Rust development environment,
You can play Rust online, without installing anything. Play Rust Lang
The recommended way to install Rust is using Rustup. It’s both installer and version manager for Rust
For macOs / Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Using other OS? check other installation method here
Update current version
Rust updates frequently. Run
rustup update to user the latest update.
What is Cargo
When we install Rustup, we also install Cargo. It does a lot of things
- build your project with
- run your project with
- test your project with
- build documentation for your project with
- publish a library to crates.io with
To make sure everything is installed. Run
Make it nice on your text editor
Whatever text-editor you use, make sure to install Rust support (syntax highlight or snippets) to make your experience better
When you install Rust, it also copy the documentation locally to read offline.
rustup doc to open it in browser (locally).
Want to uninstall?
You can run
rustup self uninstall