vtcode-ghostty-core
Pure-Rust VT terminal emulator core for VT Code, inspired by Ghostty's terminal design.
vtcode-ghostty-core processes VT byte streams incrementally via Terminal::write, maintaining a cell-based screen buffer with cursor state, styling, and terminal modes.
Modules
| Module | Purpose |
|---|---|
cell |
Cell type representing a single character cell with style and content |
color |
AnsiColor and Color types for terminal color representation |
cursor |
Cursor type tracking position, shape, and visibility |
mode |
CursorShape and MouseTracking enums for terminal mode flags |
screen |
ScreenKind enum and screen buffer management |
style |
Style type for cell-level styling (fg, bg, effects) |
parser (private) |
VT escape sequence parser |
region (private) |
Scroll region management |
terminal (private) |
Terminal implementation orchestrating parser, screen, and cursor |
Public entrypoints
Terminal— main terminal emulator; callwrite(bytes)to process VT inputCell— character cell with content and styleCursor— cursor position and shape stateColor/AnsiColor— terminal color typesStyle— cell styling (foreground, background, effects)CursorShape/MouseTracking— terminal mode enumsScreenKind— screen buffer type
Usage
use Terminal;
let mut terminal = new;
terminal.write;
terminal.write;
API reference
See docs.rs/vtcode-ghostty-core.