A comprehensive guide to learning Rust for developers with Python experience. This guide covers everything from basic syntax to advanced patterns, focusing on the conceptual shifts required when moving from a dynamically-typed, garbage-collected language to a statically-typed systems language with compile-time memory safety.
Self-study format: Work through Part I (ch 1–6) first — these map closely to Python concepts you already know. Part II (ch 7–12) introduces Rust-specific ideas like ownership and traits. Part III (ch 13–16) covers advanced topics and migration.
Pacing recommendations:
| Chapters | Topic | Suggested Time | Checkpoint |
|---|---|---|---|
| 1–4 | Setup, types, control flow | 1 day | You can write a CLI temperature converter in Rust |
| 5–6 | Data structures, enums, pattern matching | 1–2 days | You can define an enum with data and match exhaustively on it |
| 7 | Ownership and borrowing | 1–2 days | You can explain why let s2 = s1 invalidates s1 |
| 8–9 | Modules, error handling | 1 day | You can create a multi-file project that propagates errors with ? |
| 10–12 | Traits, generics, closures, iterators | 1–2 days | You can translate a list comprehension to an iterator chain |
| 13 | Concurrency | 1 day | You can write a thread-safe counter with Arc<Mutex<T>> |
| 14 | Unsafe, PyO3, testing | 1 day | You can call a Rust function from Python via PyO3 |
| 15–16 | Migration, best practices | At your own pace | Reference material — consult as you write real code |
| 17 | Capstone project | 2–3 days | Build a complete CLI app tying everything together |
How to use the exercises:
<details> blocks with solutionsDifficulty indicators:
When you hit a wall: