Chapter 3: Rust Get Started
Rust Get Started
This is exactly the right sequence! “Get Started” is the very first practical step the official Rust website pushes to every new person. It’s not just theory — it’s “let’s install Rust right now and run your first tiny program today.”
Let me explain it like your personal Rust teacher sitting next to you with a laptop, going step-by-step slowly, with screenshots-in-words, examples, and tips from real beginners in India.
What is “Rust Get Started”?
Rust Get Started = the official quick-start guide on https://www.rust-lang.org/learn/get-started
This page’s goal is simple and clear (their tagline says it best):
“Quickly set up a Rust development environment and write a small app!”
It’s the place you land when you click big buttons like “Install Rust”, “Get Started”, or “Try Rust” from the homepage. It’s shorter than The Book’s Chapter 1 — more action-focused: install → verify → create project → run Hello World → add a fun crate → see Ferris the crab say hello.
In 2026, this page is kept super clean and beginner-friendly — no fluff.
Step-by-Step — What the Official “Get Started” Page Teaches You (with my teacher explanations)
1. Try Rust without installing (optional first taste)
They say: “You can try Rust online in the Rust Playground without installing anything on your computer.” → Link: https://play.rust-lang.org/
Teacher tip: If you’re on mobile now or just want to taste Rust for 2 minutes — go there! Type this and click “Run”:
|
0 1 2 3 4 5 6 7 8 |
fn main() { println!("Namaste from Hyderabad! Trying Rust online 🚀"); } |
You see output instantly. No installation needed. Great for curiosity check.
But for real learning → install it locally.
2. Installing Rust (the main part — do this!)
They recommend Rustup — the official installer + version manager (like nvm for Node or pyenv for Python).
-
macOS, Linux, WSL (most common in India for devs) Open terminal and paste exactly:
Bash0123456curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh→ Press 1 (default install) → Enter → It downloads ~200–300 MB (fast on good connection) → After finish: close & reopen terminal (or run source $HOME/.cargo/env)
-
Windows (normal cmd or PowerShell) Download & run: https://win.rustup.rs (direct .exe) → Follow wizard → Sometimes asks to install Visual Studio C++ Build Tools (free, ~6–8 GB download — accept it, important for linking)
-
After install — verify (do this always!)
Bash012345678rustc --versioncargo --versionrustup --versionYou should see something like: rustc 1.86.0 (or newer in 2026) cargo 1.86.0 rustup 1.27.x
If not → google the error or ask me!
Also: keep Rust updated forever with:
|
0 1 2 3 4 5 6 |
rustup update |
(Do this once a month — Rust releases every 6 weeks, always stable.)
3. Cargo — Your new best friend
When you install Rust, you get Cargo free.
Cargo = build tool + package manager + test runner + more.
Basic commands they show:
- cargo new hello-rust → create new project
- cargo build → compile
- cargo run → compile + run
- cargo test → run tests
- cargo doc → build docs
- cargo publish → share your crate (later)
Teacher analogy: Think of Cargo as “npm + create-react-app + nodemon” combined, but way cleaner and faster.
4. Create your first real project (Hello World + fun)
Run:
|
0 1 2 3 4 5 6 7 |
cargo new hello-rust cd hello-rust |
Inside you get:
|
0 1 2 3 4 5 6 7 8 9 |
hello-rust/ ├── Cargo.toml ← like package.json └── src/ └── main.rs ← your code |
Default main.rs:
|
0 1 2 3 4 5 6 7 8 |
fn main() { println!("Hello, world!"); } |
Run:
|
0 1 2 3 4 5 6 |
cargo run |
→ Output: Hello, world!
They show upgrading it with a fun crate called ferris-says (Ferris is Rust’s crab mascot 🦀).
Add to Cargo.toml:
|
0 1 2 3 4 5 6 7 |
[dependencies] ferris-says = "0.3.1" |
Or easier:
|
0 1 2 3 4 5 6 |
cargo add ferris-says |
Then replace main.rs with:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
use ferris_says::say; use std::io::{stdout, BufWriter}; fn main() { let stdout = stdout(); let message = String::from("Hello fellow Rustaceans!"); let width = message.chars().count(); let mut writer = BufWriter::new(stdout.lock()); say(&message, width, &mut writer).unwrap(); } |
Run cargo run again → you get cute ASCII art:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
__________________________ < Hello fellow Rustaceans! > -------------------------- \ \ _~^~^~_ \) / o o \ (/ '_ - _' / '-----' \ \/ |
Ferris says hello! 🦀 (Rustaceans = Rust programmers, play on crustacean)
Summary in teacher voice
“Rust Get Started” is the official 5–10 minute quick-start: Install Rustup → get Cargo → create project → run Hello World → add a dependency → see something cute.
After this page, they say: “Congratulations! You are now officially a Rustacean 🦀 Go to the Learn page to continue → read The Book, do Rustlings, etc.”
So what next for you?
- Do the installation right now if not done (ask me if stuck on Windows/Linux)
- Run the ferris-says example — it’s motivating!
- Then jump to The Book Chapter 1 (very similar but deeper): https://doc.rust-lang.org/book/ch01-00-getting-started.html
Want me to guide you through troubleshooting install? Or explain Cargo.toml in detail? Or show how to set up VS Code for Rust (rust-analyzer is magic)?
Just say — class continues! 🚀
