Excellent. Before we write a lexer, parser, or compiler, we need enough Rust knowledge so that compiler code feels natural rather than confusing.

The good news is that compiler development uses only a subset of Rust heavily. We do not need to master every advanced Rust feature before starting Apex.

Rust Fundamentals Roadmap for Apex

Think of Rust learning in three layers:

Layer 1: Core Rust
        ↓
Layer 2: Data Structures & Ownership
        ↓
Layer 3: Compiler-Oriented Rust

Our goal is:

Learn Rust
    ↓
Build Lexer
    ↓
Build Parser
    ↓
Build Apex

Phase 1 — Learn Basic Rust Syntax

Rust Book Chapters

Read:

These chapters build the foundation.


Topic 1: Variables

let x = 5;

Immutable.

let mut x = 5;
x = 10;

Mutable.