Lumen
A terminal emulator built from the core up in Rust. An honest, in-progress build.
I wanted to understand terminals all the way down, so I am building one from the core up in Rust instead of reading about how they work. The rule that keeps it honest is that it has to become good enough to be my daily terminal, which is the bar that forces every layer to actually work under real use.
A terminal emulator with a hand-written VT parser, GPU text rendering, and a real PTY. This one is in progress and I am honest about that: the core state machine, the render stack, and shell bring-up work, and the full VT parser is the current focus.
A hand-written VT state machine
The parser core is the Paul Williams DEC state machine, written by hand as a pure, headless-testable module with no I/O. Building the state machine myself is the entire point of the project, so this is the part I refuse to pull from a crate.
GPU text rendering
Glyphs are rendered on the GPU with glyphon on top of wgpu. Text shaping and atlas management go through cosmic-text, and the terminal grid is drawn as dynamic text that updates each frame.
No async runtime
There is no tokio here. A dedicated thread reads the PTY and wakes the winit event loop through its proxy, so keyboard input, PTY output, and rendering coordinate without an async runtime. For a single-window app this is simpler to reason about than a reactor.
The NVIDIA and Wayland fix
The first build exited with a segfault on close because wgpu picked the GL/EGL backend and NVIDIA's driver crashes tearing that down on Wayland. Forcing wgpu to the Vulkan backend fixed it. Chasing that one taught me more about the graphics stack than any amount of reading would have.
Parsers and state machines
Writing a real protocol state machine by hand, test-first, is a skill that shows up everywhere from terminals to network protocols to file formats.
A GPU text pipeline
Getting text onto the GPU (shaping, atlasing, per-frame updates) is the hard part of any custom renderer, and it transfers to anything that has to draw a lot of text fast.
Systems debugging
The segfault-on-teardown hunt is the kind of across-the-whole-stack debugging that only a from-scratch project forces on you, and the lesson (force Vulkan on NVIDIA plus Wayland) is one I will not forget.
See the rest of the work.