My plan for learning Rust in March 2026 I aim to spend about 4 hours per week on this.
Implement a CLI tool:
- Reads file
- Counts word frequency
- Outputs sorted results
Constraints:
- No cloning unless necessary
- Explain every move
Questions:
- When does a move occur?
- Why does
Stringmove buti32copy?
Refactor week 1 tool to:
- Avoid unnecessary moves.
- Use references.
- Implement functions that borrow instead of take ownership.
- Intentionally create borrow checker errors, then fix them.
Document:
- Why the error occurs.
- What rule is being enforced.
Create:
- A small struct holding references.
- Functions returning borrowed data.
- Add explicit lifetime annotations.
Explain:
- What lifetime annotations actually mean.
- Why Rust can't infer some cases.
Implement:
- Multi-threaded word counter using
Arc+Mutex
Questions:
- Why is shared mutable state dangerous?
- What problem does
Mutexsolve? - What is a data race formally?
Concurrent Word Frequency CLI
Features:
- Multi-threaded processing of large file
- Safe shared state
- No
unsafe - Error handling
Deliverable
READMEexplaining ownership, borrowing, lifetimes, and thread safety in my implementation
- Explain why borrow checker errors happen
- Explain difference between move, borrow, and clone
- Explain how
Arc<Mutex<T>>ensures safety