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.
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
Read:
These chapters build the foundation.
let x = 5;
Immutable.
let mut x = 5;
x = 10;
Mutable.