Rust Essentials
Learn Rust from scratch. Ownership, types, error handling, and concurrency explained clearly with hands-on code.
What You'll Learn
- Getting Started: Install Rust with rustup, cargo basics, your first program
- Variables and Mutability: Immutability by default,
let mut, shadowing, constants - Data Types: Integers, floats,
char, tuples, arrays, and theStringvs&strsplit - Functions and Control Flow: Expressions,
if/match, loops - Ownership and Borrowing: Rust's killer feature, memory safety without a garbage collector
- Structs and Methods: Build complex types, attach behavior with
impl - Enums and Pattern Matching: Model "one of many" with enums,
Option, andmatch - Error Handling:
Result,Option, and the?operator for clean error propagation - Collections:
Vec,HashMap,String, the standard toolkit - Traits: Shared behavior and polymorphism without inheritance
- Generics: Write code that works across types, with zero runtime cost
- Lifetimes: The borrow checker's rules for how long references live
- Modules and Crates: Organize code and pull in dependencies with cargo
- Closures: Anonymous functions that capture their environment
- Iterators: Functional pipelines that compile to zero-cost abstractions
- Concurrency: Fearless concurrency with threads, channels,
Arc, andMutex - Async and Await: Handle thousands of I/O-bound tasks on a small thread pool
- Build a CLI Tool: A hands-on capstone, a real word counter built from scratch
Why Rust?
- No garbage collector, no manual memory management. Ownership gives you both safety and performance
- If it compiles, it (probably) works. The compiler catches entire classes of bugs at build time
- Zero-cost abstractions. High-level code that runs as fast as hand-written C
- Growing fast. Systems programming, web (WASM), CLI tools, cloud infrastructure
Prerequisites
Programming experience in any language. You should be comfortable with variables, functions, loops, and basic data structures. No prior Rust or systems programming knowledge needed.
Course Structure
24 lessons that build on each other. Ownership (lesson 5) is the turning point: everything before it builds up to it, everything after builds on it. The final lesson is a hands-on capstone where you build a real command-line tool from scratch. Each lesson has quizzes and runnable code examples. Ready to start? Choose your first lesson from the sidebar!
Resources
- Rust Playground — run Rust code in the browser, no install needed. Every example in this course works here.
- The Rust Book — the official free book. More detail on every topic covered here. Good companion reading.
- Rust by Example — official, concept-by-concept with runnable examples. Good if you learn better by reading code than prose.
- cheats.rs — every Rust syntax form on one page. Useful once you know the basics and just need a quick reference.
- Rustlings — small exercises you fix in your terminal. Great for reinforcing concepts as you go through the lessons.
- Rust Keywords — official list of all reserved and strict keywords with explanations. Useful when the compiler says "expected identifier, found keyword."
- Exercism — Rust track — 100+ exercises graded by difficulty, each with a failing test suite you fix. Community mentors review your solutions. Best way to harden your skills after finishing this course.