SIGN IN SIGN UP

feat: add new backend, rio-vt (#79)

This swaps the VT emulation backend from alacritty_terminal to
[rio-vt](https://crates.io/crates/rio-vt), the terminal core we
extracted from [Rio](https://github.com/raphamorim/rio). The PTY layer
(portable-pty) is untouched, so this is purely an engine swap behind
`Emu`.

What changed:

- `emu.rs` now wraps `rio_vt::crosswords::Crosswords`. Cell
colors/attributes are resolved from rio-vt's packed cell + per-grid
style table, mapped to the same `EmuCell`/`Color` surface the rest of
the code consumes.
- `CommandTracker` in `integration.rs` keeps its exact logic; it just
implements rio-vt's `Perform` trait instead of vte's (same state machine
lineage, same callback shape, so the diff there is one import line).
- Terminal replies (DA/DSR/CPR) come from rio-vt as events and flow
through the same pending-writes path as before.

Why: rio-vt is actively maintained, it's the engine we run in production
in Rio, and it brings correct unicode width/grapheme handling plus
shell-integration parsing (OSC 7/133) natively should shell-use want to
lean on more of it later. It also drops the winit-adjacent transitive
deps that alacritty_terminal pulls in. Throughput is on par with or
ahead of alacritty_terminal on parsing-heavy workloads; benchmarks
against alacritty_terminal and vt100 live at
https://github.com/raphamorim/rio-vt-benchmark.

Verified: all 48 tests pass, clippy clean. I also drove the real daemon
on macOS: session open, `submit`/`wait command`, exit-code + cwd
tracking (OSC 133/7), bold/color/underline cell attributes via `cells`,
and wide characters (CJK with correct spacer cells). Screenshot/SVG
rendering works.

One pre-existing quirk I noticed while testing (not from this change;
reproduces on main): with zsh the captured command can double the first
character ("pprintf ..."), which seems to come from prompt repaint echo.
Happy to dig at that separately.

---------

Signed-off-by: cpendery <cpendery@vt.edu>
Co-authored-by: cpendery <cpendery@vt.edu>
R
Raphael Amorim committed
aaad0da8f9446fed699338b92dddb6deffe3082f
Parent: 6e826fb
Committed by GitHub <noreply@github.com> on 8/21/2026, 2:16:10 AM