View : 0
23/03/2026 03:31am

How to Install Rustup & Setup IDE (VS Code & RustRover) | Rust The Series EP.2
#Install Rust
#Rust tutorial
#Rustup guide
#VS Code Rust setup
#Rust
#Superdev Academy
Welcome back to Rust The Series by Superdev Academy!
In EP.1, we explored why Rust has been voted the "most loved language" by programmers worldwide for several consecutive years. In this article, it’s time to get our hands dirty!
Just like a warrior needs a reliable weapon, a programmer needs the right environment. Today, we will set up our machines for Rust development—covering everything from proper installation to choosing the right Editor (IDE) to ensure your coding experience is as smooth as possible.
1. Installing Our Hero: Rustup
To install Rust, we don't just download a basic installer. Instead, we use a tool called Rustup, the official toolchain installer for Rust. The beauty of Rustup is that it installs everything you need in one go: rustc (the compiler), cargo (the incredible package manager), and other essential utilities.
💻 For macOS and Linux Users
If you are on macOS (especially Apple Silicon like the M-series, which compiles code incredibly fast!) or Linux, open your Terminal and paste the following command:
Bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Once you hit Enter, a menu will appear. Type 1 (Proceed with installation (default)) and wait for the process to complete.
🪟 For Windows Users
Go to rustup.rs and download the rustup-init.exe file, then follow the standard installation steps.
⚠️ Note for Windows Users: Rust requires C++ Build Tools. If your machine doesn't have them yet, the installer will notify you. You'll need to download the Visual Studio Installer and select the workload named "Desktop development with C++" before proceeding.
✅ Verification
After installation, close your current Terminal and open a new one. Type the following commands to check if your tools are ready:
Bash
rustc --version
cargo --version
If you see the Rust version (e.g., rustc 1.xx.x), your machine is ready for action!
(💡 Tip: To update Rust to the latest version in the future, simply run rustup update.)
2. Choosing Your Sword: VS Code or RustRover?
Writing Rust becomes ten times more enjoyable with an IDE (Integrated Development Environment) that provides code completion, suggestions, and error checking in real-time. Currently, there are two major contenders favored by the Rust community:
Option 1: Visual Studio Code (VS Code) + rust-analyzer
This is the most popular free choice. VS Code is lightweight and highly customizable. However, since it doesn't support Rust natively, you’ll need these essential extensions:
rust-analyzer (Crucial 🌟): The brain of your Rust setup. It provides auto-complete, quick fixes, and real-time error highlighting. (Note: Avoid the old "Rust" extension as it is no longer maintained).
CodeLLDB: Essential for debugging, allowing you to run code line-by-line and inspect memory variables.
Even Better TOML: Rust configuration files (
Cargo.toml) use the TOML format. This extension adds syntax highlighting and makes them easier to read.crates: A handy helper that tells you if your libraries (Crates) are up to date.
Error Lens (Recommended): This brings Rust’s detailed error messages right next to the problematic line of code, helping you debug much faster.
Option 2: RustRover by JetBrains
If you prefer an "Out-of-the-box" experience without fiddling with extensions, RustRover is the way to go. Created by JetBrains (the makers of IntelliJ and WebStorm), it is designed specifically for Rust.
It features highly intelligent code analysis and built-in support for Cargo and debugging. Best of all, JetBrains currently offers a free version for non-commercial use, making it a fantastic choice for beginners who want to save time on setup.
3. Testing Your Blade: The Series' First Project
To ensure everything is working perfectly, let's create our first project. Open your Terminal and type:
Bash
cargo new hello_superdev
cd hello_superdev
The cargo new command creates a new project folder with boilerplate files. If you open src/main.rs, you will see the following Rust code:
Rust
fn main() {
println!("Hello, world!");
}
fn main()is the entry point for every Rust program.println!prints text to the screen. (Note the!at the end—in Rust, this is a Macro, not a standard function. We’ll dive deeper into this in later chapters.)
Now, run your program with:
Bash
cargo run
If your screen displays Hello, world! Congratulations! You have officially become a Rustacean (the name for Rust developers).
Conclusion
Today, we’ve equipped ourselves with the essential tools: Rustup and a powerful IDE. Seeing "Hello, world!" on your screen is a massive first step for any new Rustacean!
In EP.3: Hello World & Cargo, we will dissect the project structure we just created and explore the powerful features of Cargo in more depth.
Get your computers and IDEs ready—I’ll see you in the next article! You’re going to love what Cargo can do.
🎯 Follow Superdev Academy for more high-quality Dev content:
🔵 Facebook: Superdev Academy Thailand
🎬 YouTube: Superdev Academy Channel
📸 Instagram: @superdevacademy
🎬 TikTok: @superdevacademy
🌐 Website: superdevacademy.com