The Weekly Learning Plan

Sixteen weeks at 8–12 hours per week. This is a plan you can actually follow, with the time sinks marked honestly — because the reason people abandon projects like this is not difficulty, it is being three weeks behind an unrealistic schedule and quietly deciding they are bad at it.

You are not behind. Weeks 8, 9, and 13 take longer than they look for everybody.


The Calendar

WeekFocusLabsMilestoneHoursNotes
1Orientation: read the overview, do the Lua warm-up, scaffold the crate—M08Do not skip the warm-up. It is the cheapest hour in the curriculum.
2Lexer, spans, and the first error message1M110Spans feel like overhead now. They are not.
3Pratt parser, precedence, the AST2M112Time sink. Precedence climbing takes two sittings to click.
4Tree-walking evaluator; values and type errors3, 4M1–M21010 + 20 * 3 → 70. Celebrate this.
5Variables, scope, shadowing5M38The HashMap environment. Know it is wrong; use it anyway.
6Control flow: if/while/for/break/return6M410Truthiness and short-circuit semantics are fiddlier than the loops.
7Functions, frames, recursion; the corpus7, 8M512Checkpoint. You have a language. Freeze it as the reference.
8Bytecode design, the opcode table, the disassembler9M612Time sink. Designing an instruction set means making thirty decisions, each of which you will revisit.
9The compiler: scopes, slots, jump patching10M712Time sink. Jump patching is where off-by-one lives. Read your own disassembly by hand.
10The VM; ember trace; differential testing11, 12M812Checkpoint. Two backends, one answer.
11Tables: array part, hash part, iteration order13M912The most reusable data-structure work in the curriculum.
12Closures and upvalues14M1012The conceptual peak. Draw the diagrams before writing code.
13Garbage collection; strings and interning15, 16M1114Biggest week. Budget for it. The "forgot a root" bug is a rite of passage.
14Multiple returns, varargs, metatables17, 18M1210Your differential tests will break here. That is them working.
15Embedding: Engine, host objects, stdlib, modules19–22M1312Re-entrancy vs. the borrow checker is the hardest Rust in the book.
16Sandboxing, diagnostics, REPL, tests, benchmarks23–27M1412Production posture. Write docs/limitations.md honestly.
17+Performance, inline caches, specialization, the JIT28–30M1412+Open-ended by design. Stop when the measurements stop surprising you.
—Capstone: the policy engine and the end-to-end trace——12–20Do not rush this. It is the deliverable you will show people.

Total: roughly 180 hours to M14, plus the capstone. Compressible to about 120 if you have implemented a language before and skip the optional challenges. Not compressible below that without skipping Section 4, which would be skipping the point.


Three Ways to Run This

The full path (16–20 weeks)

Everything above. You end with a runtime you can defend in a design review and a portfolio project that demonstrably teaches something.

The language-implementer path (10 weeks)

For someone who wants the compiler and VM knowledge and does not need the embedding story.

Weeks 1–14 as written, then STOP after M12.
Skip Section 5 (embedding), do Section 6's testing and benchmarks only.

You lose: the host boundary, sandboxing, the capstone. You keep: a complete, correct, tested language with a real GC. That is a legitimate stopping point and it is roughly Crafting Interpreters plus differential testing plus a real table.

The embedder's path (8 weeks)

For someone who needs to embed a scripting language in a Rust service next quarter and wants to understand what they are choosing.

Week 1:    overview + warm-up
Weeks 2–4: Sections 1–2 (you need to understand what you are shipping)
Week 5:    Section 3 by READING, not building — do Lab 12 (differential testing) anyway
Weeks 6–7: Section 5 (embedding) against `mlua` instead of your own runtime
Week 8:    Section 6's sandboxing + threat model + the capstone's
           "when not to embed a language" chapter

You will not have built a VM. You will be able to evaluate mlua, rune, rhai, and koto against your actual requirements and defend the choice — which, for that audience, is the real deliverable. Come back for Sections 3, 4, and 7 when you have time.


Weekly Working Protocol

The same shape every week. It is boring on purpose; the point is that no week starts with "where was I?"

MONDAY (30 min)      Re-read last week's docs/learning/ entry.
                     Write this week's predictions for the lab's Predict-First questions.

MIDWEEK (bulk)       Implement. One commit per lab step, message prefixed `lab-NN:`.
                     Run the Trace after every step that changes a representation.

FRIDAY (60 min)      Write the docs/learning/ entry for the subsystem, from memory first,
                     THEN check it against the chapter. The gap is your real progress report.
                     Write any ADR the week produced.

WEEKEND (optional)   Challenge extensions. Read one item from the reading list.

Tip: "From memory first, then check" is the whole trick. Re-reading feels like learning and is not; retrieval is. If you can only adopt one habit from this curriculum, adopt that one.


Where People Actually Get Stuck

WeekThe wallWhat it actually isWhat to do
3"I don't understand precedence climbing"You are trying to hold the recursion in your headTrace 1 + 2 * 3 ^ 4 on paper, writing the binding-power comparison at every step. Twenty minutes, and it clicks permanently.
8"I can't decide on the instruction set"Analysis paralysis; there is no right answerCopy the opcode table from the reference chapter verbatim. Change it in Section 7 when a benchmark tells you to.
9"My jumps go to the wrong place"Off-by-one between "offset of the jump" and "offset after the jump"Print the disassembly with absolute targets. Do not debug jump patching by reading the compiler.
10"The VM works but disagrees with the interpreter"This is the system working exactly as designedThe disagreement is a bug you would otherwise have shipped. Find which backend is wrong before you decide which to change.
12"I don't get upvalues"You are trying to learn closures and upvalues at onceDo the naive version first: heap-allocate every captured variable. Get it correct. Then optimize into open/closed. Two problems, solved separately.
13"The GC frees live objects"A missing root or a missing edgeEnumerate roots in one function and trace edges in one trait method. If either is spread across the codebase, that is the bug.
15"The borrow checker won't let a host function call back into the VM"It is right; you are trying to hold &mut Vm across a callbackThis is the central Rust lesson of Section 5. Do not reach for unsafe. The chapter shows three legitimate shapes; pick one.
17"My optimization made it slower"It probably didRecord it, revert it, keep the record. A reverted optimization with a measurement is worth more than a kept one without.

If You Fall Behind

Cut in this order. The list is ordered by how little you lose.

  1. Challenge extensions. They are optional and labeled.
  2. Section 7's JIT (Lab 30). Read the architecture chapter; skip the implementation. You lose hands-on Cranelift, not the concepts.
  3. Lab 22 (modules). A single-file policy engine is a legitimate product.
  4. Lab 16's interning optimization. Keep plain owned strings; note the benchmark you did not do.
  5. Section 6's fuzzing. Only if you also delete the word "production" from your README, because the claim depends on it.

Do not cut:

  • The warm-up, the mental model, or the ADRs. They are cheap and they are load-bearing.
  • Lab 12 (differential testing). Everything after it is built on the guarantee it provides.
  • Lab 15 (GC). A scripting language without a real collector is a demo.
  • The end-to-end trace at the capstone. It is the artifact that proves the rest.

Validation / Self-check

  1. Which three weeks are marked as time sinks, and what is the underlying difficulty in each?
  2. Which two labs must never be cut, and what does each guarantee?
  3. What is the Friday protocol, and why is "from memory first" the important part?
  4. You have eight weeks and you need to choose an embedding language for a service. Which path do you take and what do you give up?
  5. Your VM disagrees with your tree walker in week 10. Why is that a good week, not a bad one?

Next: The Teaching Method.