Rust / Advanced · Free public pilot
Advanced Rust in 7 Days
Design a stock ledger that bounds its input, commits complete batches and handles retries predictably.
Start your first lesson →Build on Rust intermediate.
Come in comfortable with lifetimes, generics, traits, iterators, typed errors and injected I/O. Allow about 100–130 minutes per day for reading and practice. Split a day across sessions if you need more time.
Run Rust 2024 in your browser with code-playpad’s experimental compiler. The first Run downloads about 57 MB and caches the toolchain. Enter console input before pressing Run.
Each day ends with independent practice. Day 7 includes a multi-file project, an optional Cargo download and a review to try after a few days. Progress is saved in this browser.
Need a refresher? Review Rust Intermediate →
Day 1 · About 119 minutes
Encode Invariants in APIs
Validate newtypes, preserve typed errors and consume values through checked state transitions.
- Validate Values Through TryFrom 28 min · Read, predict and practice
- Carry Context in an Error 28 min · Read, predict and practice
- Consume a Draft into a Checked Value 28 min · Read, predict and practice
- Checkpoint: A Checked Transfer 35 min · Independent checkpoint
Day 2 · About 120 minutes
Choose Ownership and Dispatch
Use Cow, trait objects and closure bounds at deliberate API boundaries.
- Borrow Until Text Needs to Change 28 min · Read, predict and practice
- Own Interchangeable Rules with Box and dyn 30 min · Read, predict and practice
- Specify How a Callback May Capture State 30 min · Read, predict and practice
- Checkpoint: A Runtime Rule and a Reporter 32 min · Independent checkpoint
Day 3 · About 123 minutes
Process Fallible Streams
Implement an iterator, collect fallible results and bound input before parsing.
- Implement an Iterator with an Associated Item 30 min · Read, predict and practice
- Collect Results into One Result 28 min · Read, predict and practice
- Bound a Line Before Allocating the Whole Stream 30 min · Read, predict and practice
- Checkpoint: Parse One Bounded Batch 35 min · Independent checkpoint
Day 4 · About 116 minutes
Commit Batches Atomically
Check arithmetic, stage state changes and handle retries without applying work twice.
- Check Arithmetic Before Assigning State 28 min · Read, predict and practice
- Stage Changes and Commit Once 28 min · Read, predict and practice
- Make Repeated Requests Predictable 28 min · Read, predict and practice
- Checkpoint: Commit Stock and Receipt Together 32 min · Independent checkpoint
Day 5 · About 131 minutes
Expose a Reusable Library
Preserve error causes, encode deterministic snapshots and return borrowed queries.
- Preserve an Error’s Underlying Cause 28 min · Read, predict and practice
- Define a Deterministic Snapshot Format 28 min · Read, predict and practice
- Return a Query That Borrows Its Owner 30 min · Read, predict and practice
- Checkpoint: Decode, Query and Report Stock 45 min · Independent checkpoint
Day 6 · About 122 minutes
Test the Guarantees
Use a reference model, controlled mutations and injected failures to test the contract.
- Compare Against a Small Reference Model 30 min · Read, predict and practice
- Make a Plausible Regression Fail 30 min · Read, predict and practice
- Inject Partial Writes and Propagate Failure 30 min · Read, predict and practice
- Checkpoint: Observe a Commit After Output Fails 32 min · Independent checkpoint
Day 7 · About 152 minutes
Ship the Stock Ledger
Run, test and extend a transactional stock ledger, then build a reservation ledger independently.
- Run the Transactional Stock Ledger 26 min · Read, predict and practice
- Trace Validation, Ownership and Commit 28 min · Read, predict and practice
- Test the Ledger’s Guarantees 28 min · Read, predict and practice
- Add a Stock Query and Use Cargo 30 min · Read, predict and practice
- On Your Own: A Reservation Ledger 40 min · Independent checkpoint
- Come Back Later: Ownership, Atomicity and Receipts 45 min · Extra delayed review