Rust Get Started
🦀 Rust Get Started
This section will help you Rust Get Started from zero — installation, first program, and running it step by step.
🔽 Step 1: Install Rust
Rust is installed using a tool called rustup.
Windows
-
Go to 👉 https://www.rust-lang.org
-
Click Install
-
Download and run
rustup-init.exe -
Choose option 1 (default installation)
Linux / macOS
Open terminal and run:
Restart your terminal after installation.
✔️ Step 2: Verify Installation
Check if Rust is installed correctly:
You should see version numbers like:
📁 Step 3: Create Your First Rust Project
Rust uses Cargo (its build system & package manager).
Run:
Project structure:
✍️ Step 4: Write Your First Rust Program
Open src/main.rs:
▶️ Step 5: Run the Program
Inside the project folder:
Output:
🎉 Congratulations! Your first Rust program is running.
🔨 Useful Cargo Commands
| Command | Purpose |
|---|---|
cargo build |
Compile project |
cargo run |
Build + Run |
cargo check |
Check errors without building |
cargo clean |
Remove build files |
🧠 How Rust Programs Work
-
Execution starts from
main() -
Rust is compiled, not interpreted
-
Errors are caught at compile time
-
No garbage collector — memory handled safely by Rust

