Expand description
Reader task — drains the master PTY’s read side into the
published TerminalSnapshot cell.
T2 substrate swap (2026-05-25): replaced the homegrown
TerminalGrid placeholder with alacritty_terminal::Term +
vte::ansi::Processor. Lattice now inherits a full
VT/xterm parser (SGR colors / alt-screen / DECCKM /
cursor-visibility / OSC titles / scrollback) from the
battle-tested alacritty stack — same engine alacritty,
zed, and neovide use.
The renderer-facing contract (writes to
Arc<ArcSwap<TerminalSnapshot>>) is unchanged. The cells
we publish now carry real TerminalColor::Named / Indexed / Rgb values via [map_cell].
Structs§
- Grid
Search Hit - T3.b (2026-05-25): result of
SharedTerm::find_match. Carries the alacrittyLineand column of a search hit so the caller can scroll the viewport to the matching row. - Shared
Term - Shared handle to the alacritty
Termowned by a spawned terminal. The reader task locks theMutexto advance bytes from the PTY; the host’s dispatch path locks it to invoke scroll / resize / future-T2.c operations. Contention is minimal — the reader only holds the lock during chunk processing (microseconds per call) and dispatch operations are user-driven (one per keystroke).
Enums§
- Search
Dir - T3.b: search direction. Mirrors
lattice_grammar::SearchDirectionwithout depending on the grammar crate from the substrate. - Terminal
Scroll Kind - T3 (2026-05-25): how the caller asks the terminal to
reposition the viewport over its scrollback. Mapped 1:1 to
alacritty’s
Scrollenum at the dispatch site so the public API doesn’t leak alacritty types.
Functions§
- spawn_
reader - Spawn the reader task on a detached OS thread. Returns the
SharedTermhandle the caller stores alongside the snapshot so dispatch-time operations (scroll, resize) can reach into the alacrittyTerm.