Rust
Learn ownership, borrowing, and explicit error handling through small programs. The memory model is enduring; edition-specific syntax and ecosystem APIs should be checked in the installed toolchain’s documentation.
Get an in-app notice when new lessons or practice are added.
12 chapters across 4 modules
Course chapters
Explore all 12 chapters in any order. Each chapter has learning goals, a practice prompt, and a primary reference; expanded reading pages are linked from their chapter titles.
No matching chapters. Try another term.
01 · Toolchain and ownership3 chapters
Cargo and reproducible projects
- Distinguish a package, crate, dependency, and lockfile
Practice: Create a package, run its tests, and explain its build files.
Read the primary referenceLesson guide · ReadyOwnership and borrowing
Use compiler feedback to explain who owns a value and who may access it.
- Track which binding owns a value and when a reference is valid
Practice: Repair a use-after-move example and choose a borrow when transfer is unnecessary.
Read the primary referenceExpanded reading · ReadySlices and lifetime relationships
- Describe what a borrowed slice depends on without treating lifetimes as runtime timers
Practice: Write a function returning a slice tied to an input and test empty input.
Read the primary referenceLesson guide · Ready
02 · Modeling data and behavior3 chapters
Structs, enums, and pattern matching
- Represent valid states directly and handle each enum variant
Practice: Model lesson loading as idle, loading, ready, or failed states.
Read the primary referenceLesson guide · ReadyTraits and generic functions
- Express required behavior without coupling to one concrete representation
Practice: Implement a display trait for two reading-record types.
Read the primary referenceLesson guide · ReadyCollections and iterators
- Choose ownership or borrowing deliberately when transforming collections
Practice: Parse and summarize borrowed lines without cloning every field.
Read the primary referenceLesson guide · Ready
03 · Errors and resource management3 chapters
Option, Result, and propagation
- Distinguish absence, recoverable failure, and a violated invariant
Practice: Return descriptive parsing errors and propagate file errors with context.
Read the primary referenceLesson guide · ReadyResource cleanup and smart pointers
- Explain deterministic drop and when shared ownership is justified
Practice: Compare scoped file cleanup with an Rc-based shared tree model.
Read the primary referenceLesson guide · Ready
04 · Testing and a practical tool3 chapters
Tests and documentation examples
- Choose behavioral cases for normal, boundary, and failed input
Practice: Write unit tests and a runnable documentation example for a parser.
Read the primary referenceLesson guide · ReadyUnsafe boundaries and API contracts
- Explain why unsafe code shifts proof obligations rather than disabling all checks
Practice: Audit a documented unsafe function contract without adding unnecessary unsafe code.
Read the primary referenceLesson guide · ReadyBuild a text inspection CLI
- Combine validated input, explicit errors, and predictable output
Practice: Ship a file-summary command with help text, exit codes, and tests.
Read the primary referenceLesson guide · Ready
Learn it. Check it. Try again.
11 original questions with worked explanations and source references. Filter by difficulty, revisit mistakes, and save your attempt as you go.
Open Rust practiceBooks & references
Free reading at the publisher or author’s site. External materials keep their own licenses.
- The Rust Programming LanguageRust project · book
Source & reuse terms
Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.
- Rust by ExampleRust project · book
Source & reuse terms
Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.
- The Cargo BookRust project · book
Source & reuse terms
Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.
- Rust standard libraryRust project · documentation
Source & reuse terms
Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.
- Rust learning pathsRust project · course
Source & reuse terms
Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.