How long does it take to learn Rust?
Short answer: With an hour or so on most days, a few weeks before small programs stop fighting you, and three to six months before you’re useful on something real. Anyone quoting a tighter number is guessing.
Three finish lines
Section titled “Three finish lines”“Learned” hides three different points, months apart.
- You can read Rust and change a line without breaking the build.
- You can start from an empty file without following a tutorial.
- You’re the person your team asks when the Rust service misbehaves at 3am.
The ranges below are for the second one. The first arrives quickly. The third comes with the job, not before it.
Ranges by what you want to build
Section titled “Ranges by what you want to build”Assuming an hour on most days, and no earlier Rust:
| What you want to build | Roughly |
|---|---|
| small programs you run yourself | a few weeks |
| a command-line tool other people run | a couple of months |
| a service you deploy and keep running | three to six months |
| anything async or heavily concurrent | add one to two months |
If Rust is also your first language, add to all of that. You’re learning programming and Rust at once, which is what the first article in this chapter argues against. If you’ve written C or C++ before, you already have half the model and the numbers shrink.
Where the weeks go
Section titled “Where the weeks go”The syntax is small. Days, not weeks. match and enum take an afternoon.
Ownership and borrowing is the wall. The first few weeks are mostly being told no, and what you’re learning is the rule everything else follows: one owner at a time. The ownership chapter exists because it takes repetition, not reading.
Lifetimes come after borrowing, not before. You’ll meet the borrow checker long before you can write the annotations it asks for.
Async is a second language laid over the first. You can build plenty of Rust without ever needing it.
What actually shortens it
Section titled “What actually shortens it”- Programs that have to run. Following a tutorial is a reread. Something that has to work is the lesson.
- Reading the error instead of fighting it. Each rejection is ownership explained at the line you got wrong, and the explanations ship with the toolchain:
rustc --explain E0382prints one with no browser and no network.
- Should you learn Rust? — the rest of this chapter
- Compiler errors — the messages you’re about to meet, one code at a time