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

#TutorialWhat You Will Learn
1Why 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.

#TutorialWhat You Will Learn
2Installation and Your First Programrustup, Cargo, VS Code setup, first program
3Variables, Types, and Functionslet, mut, basic types, shadowing, functions
4Ownership — The Key ConceptMove semantics, Copy trait, ownership rules
5Borrowing and ReferencesImmutable/mutable references, borrowing rules
6Structs and MethodsDefining structs, methods, associated functions
7Enums and Pattern MatchingEnum variants, match, Option, if let
8Error HandlingResult, ?, panic, custom error types

Part 2: Intermediate (Tutorials #9–#18)

Build stronger programs with Rust’s type system, concurrency, and project organization.

#TutorialWhat You Will Learn
9Traits — Shared BehaviorDefining traits, impl, trait bounds, derive
10GenericsGeneric functions, structs, trait bounds, monomorphization
11LifetimesLifetime annotations, elision rules, structs with lifetimes
12Closures and IteratorsClosure syntax, Fn traits, iterator adapters, collect
13Smart PointersBox, Rc, Arc, RefCell, when to use each
14Concurrency — Threads, Channels, and Message Passingstd::thread, mpsc channels, Mutex, Arc
15Async/Await and Tokioasync fn, .await, Tokio runtime, join!, select!, spawning tasks
16Collections — HashMap, BTreeMap, VecDequeEntry API, BTreeMap ranges, HashSet, VecDeque, BinaryHeap
17Modules and Cratesmod, pub, use, file-based modules, re-exports, workspaces
18Testing in RustUnit tests, integration tests, doc tests, assertions, test organization

Part 3: Web and APIs (Tutorials #19–#23)

Build web services and work with data.

#TutorialWhat You Will Learn
19Advanced Error Handling (thiserror, anyhow)thiserror, anyhow, context, error chains, production patterns
20Serde and JSONJSON, TOML, custom serialization, derive macros
21HTTP with ReqwestGET/POST requests, headers, JSON, error handling
22Web API with AxumRouting, handlers, extractors, shared state, CORS
23Database with SQLxSQLite, queries, transactions, connection pools

Part 4: Tools and Systems (Tutorials #24–#26)

Build tools and work with advanced patterns.

#TutorialWhat You Will Learn
24CLI Tools with ClapArgument parsing, subcommands, flags, validation
25File I/O and Path HandlingReading/writing files, paths, directory traversal
26MacrosDeclarative macros, macro_rules!, common patterns

Part 5: Advanced Topics (Tutorials #27–#30)

Cutting-edge Rust applications and low-level programming.

#TutorialWhat You Will Learn
27Unsafe RustRaw pointers, unsafe blocks, FFI, safe abstractions
28Embedded Rustno_std, embedded-hal, GPIO, state machines, Embassy
29Rust for AI/MLMatrix ops, DataFrames, neural networks, Polars, Burn
30WebAssembly with Rustwasm-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