A complete, step-by-step Rust tutorial series. From your first program to building web APIs, CLI tools, and systems-level projects. Every article has working code you can copy and run.
No complicated theory. Just simple explanations and real code.
Introduction
| # | Tutorial | What You Will Learn |
|---|---|---|
| 1 | Why Learn Rust in 2026? | Why Rust matters, who uses it, what you can build |
Part 1: Foundations (Tutorials #2–#8)
Learn the building blocks of the Rust language.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 2 | Installation and Your First Program | rustup, Cargo, VS Code setup, first program |
| 3 | Variables, Types, and Functions | let, mut, basic types, shadowing, functions |
| 4 | Ownership — The Key Concept | Move semantics, Copy trait, ownership rules |
| 5 | Borrowing and References | Immutable/mutable references, borrowing rules |
| 6 | Structs and Methods | Defining structs, methods, associated functions |
| 7 | Enums and Pattern Matching | Enum variants, match, Option, if let |
| 8 | Error Handling | Result, ?, panic, custom error types |
Part 2: Intermediate (Tutorials #9–#18)
Build stronger programs with Rust’s type system, concurrency, and project organization.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 9 | Traits — Shared Behavior | Defining traits, impl, trait bounds, derive |
| 10 | Generics | Generic functions, structs, trait bounds, monomorphization |
| 11 | Lifetimes | Lifetime annotations, elision rules, structs with lifetimes |
| 12 | Closures and Iterators | Closure syntax, Fn traits, iterator adapters, collect |
| 13 | Smart Pointers | Box, Rc, Arc, RefCell, when to use each |
| 14 | Concurrency — Threads, Channels, and Message Passing | std::thread, mpsc channels, Mutex, Arc |
| 15 | Async/Await and Tokio | async fn, .await, Tokio runtime, join!, select!, spawning tasks |
| 16 | Collections — HashMap, BTreeMap, VecDeque | Entry API, BTreeMap ranges, HashSet, VecDeque, BinaryHeap |
| 17 | Modules and Crates | mod, pub, use, file-based modules, re-exports, workspaces |
| 18 | Testing in Rust | Unit tests, integration tests, doc tests, assertions, test organization |
Part 3: Web and APIs (Tutorials #19–#23)
Build web services and work with data.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 19 | Advanced Error Handling (thiserror, anyhow) | thiserror, anyhow, context, error chains, production patterns |
| 20 | Serde and JSON | JSON, TOML, custom serialization, derive macros |
| 21 | HTTP with Reqwest | GET/POST requests, headers, JSON, error handling |
| 22 | Web API with Axum | Routing, handlers, extractors, shared state, CORS |
| 23 | Database with SQLx | SQLite, queries, transactions, connection pools |
Part 4: Tools and Systems (Tutorials #24–#26)
Build tools and work with advanced patterns.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 24 | CLI Tools with Clap | Argument parsing, subcommands, flags, validation |
| 25 | File I/O and Path Handling | Reading/writing files, paths, directory traversal |
| 26 | Macros | Declarative macros, macro_rules!, common patterns |
Part 5: Advanced Topics (Tutorials #27–#30)
Cutting-edge Rust applications and low-level programming.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 27 | Unsafe Rust | Raw pointers, unsafe blocks, FFI, safe abstractions |
| 28 | Embedded Rust | no_std, embedded-hal, GPIO, state machines, Embassy |
| 29 | Rust for AI/ML | Matrix ops, DataFrames, neural networks, Polars, Burn |
| 30 | WebAssembly with Rust | wasm-pack, wasm-bindgen, Leptos, running Rust in the browser |
Who is This For?
- Beginners who want to learn Rust from scratch
- Web developers exploring systems programming
- Backend developers looking for a fast, safe language
- Anyone who learns better by building real things instead of reading documentation
How to Use This Series
Start from Tutorial #1 and go in order. Each tutorial builds on the previous one. If you already know ownership and borrowing, jump to Part 2 (Tutorial #9) for intermediate patterns.
Need a quick reference? Check the Rust Cheat Sheet.
Source Code
All code from this series is on GitHub: kemalcodes/rust-tutorial