A Rust port of the high-performance wterm terminal emulator for the web.
Originally written in Zig, this project migrates the core VT100/VT220/xterm escape sequence parser and state machine to Rust (compiled to WASM). The frontend remains standard DOM/React for flawless accessibility, text selection, and screen reader support.
Here is a recording of the headless browser interacting with the terminal emulator, automatically captured during our Playwright visual regression tests:
(If the video above doesn't render, check demo.webm in the repository).
This project uses an agent-driven development workflow:
- Core Translation: Autonomous agents (Claude Code) are actively porting
parser.zig,terminal.zig,grid.zig, andcell.zigto Rust#[no_mangle]equivalents. - Visual Parity: We use Playwright Interactive to capture screenshots of the original Zig WASM and compare them against the Rust WASM under identical sequence inputs.
- ABI Adherence: The Rust codebase strictly implements the 12-byte C-ABI cell layouts expected by the
@wterm/coreTypeScript bridge.
- Original Author: Florian Narr
- Original Repository: vercel-labs/wterm
- Goal: Bring safe, structured concurrency to the parser state machine while maintaining the 12-byte memory layout required for zero-copy DOM rendering.