The Rust ladder
Twelve rungs from variables and loops to what Gestalt's engine needs. Each rung has a lesson, an exercise you run on your Mac, and cards to keep it.
Sign in to keep your progress
Lessons are open to read. Your marks and card reviews are kept under your name. Sign in or create a learner.
Rung 1
Basics: values, loops, functions
let and mut, integer types, if, for, while, functions and Vec. Everything in Gestalt is bytes and counts.
Rung 2
Ownership and borrowing
Moves, &, &mut, slices and String vs &str. How the codec reads an entry without copying it.
Rung 3
Structs, enums, Option and Result
Data as types, match, Option, Result and ?. Why a refusal is a value and a hole is never false.
Rung 4
Traits and generics
Ports: the kernel names what it needs and the node plugs in the real thing.
Rung 5
Iterators, closures and fold
State is a fold over a record's entries. Derive is a pure function.
Rung 6
Determinism
BTreeMap, no floats, no clock, no randomness: the same inputs give the same bytes everywhere.
Rung 7
Bytes and cryptography
Canonical CBOR, SHA-256, hash chains, Merkle trees and Ed25519.
Rung 8
Crates, layering and no_std
Why the kernel builds for Wasm and a microcontroller, and how the gates keep each crate in its plane.
Rung 9
The Wasm sandbox
Law modules from records, run sandboxed and metered. An overrun is a hole.
Rung 10
The edge: async and I/O
tokio, files and TLS live at the edge so the kernel stays pure.
Rung 11
SurrealDB as a projection
Speed, never truth: a read model filled from the logs, dropped and rebuilt at will.
Rung 12
Tests as the contract
Golden vectors, conformance profiles and gates. Code that passes the vectors is Gestalt.