A terminal emulator written in Rust. GPU-rendered, real PTY shell, VT parsing via the vt100 crate.
I wanted to understand how terminals actually work — the whole stack from keystroke to character appearing on screen. Building one seemed like the best way to learn. It's not xterm-level complete but it runs a real shell, renders via the GPU, and handles most common escape sequences.
PTY process ──→ Rust core (VT parsing, screen state) ──→ egui rendering (C FFI bridge supplies tab/window chrome state)
The PTY spawns whatever shell you have set, reads its output, and parses escape sequences into screen state that egui renders. A small C bridge carries tab/window chrome state across the FFI boundary; it's compiled at build time by Rust's build script.
cargo runOpens a terminal window connected to your default shell.
Cmd+Ctrl+Fopens scrollback search,Cmd+Topens a new tab,Cmd+Shift+Wcloses the active tab.
On first launch it creates a TOML config at:
- macOS:
~/Library/Application Support/com.lumi.lumi-term/lumi-term.toml - Linux:
$XDG_CONFIG_HOME/lumi-term/lumi-term.toml
[window]
title = "Lumi-Term"
width = 1280.0
height = 760.0
[terminal]
font_size = 16.0
scrollback = 10000
shell = "/bin/zsh"
[theme]
background = [17, 17, 17]
foreground = [233, 233, 233]src/
├── main.rs # entry point
├── app.rs # event loop, frame timing
├── pty.rs # PTY spawn, I/O, session lifecycle
├── config.rs # TOML loading
└── chrome_bridge.rs # C FFI declarations
native/
├── lumi_chrome.c # tab/window chrome state bridge
└── lumi_chrome.h
cargo build --release
cargo clippyRust toolchain, C11 compiler (for the bridge), macOS 12+ or Linux with Wayland/X11.