Swap alacritty_terminal for rio-vt - #79
Open
raphamorim wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This swaps the VT emulation backend from alacritty_terminal to rio-vt, the terminal core we extracted from Rio. The PTY layer (portable-pty) is untouched, so this is purely an engine swap behind
Emu.What changed:
emu.rsnow wrapsrio_vt::crosswords::Crosswords. Cell colors/attributes are resolved from rio-vt's packed cell + per-grid style table, mapped to the sameEmuCell/Colorsurface the rest of the code consumes.CommandTrackerinintegration.rskeeps its exact logic; it just implements rio-vt'sPerformtrait instead of vte's (same state machine lineage, same callback shape, so the diff there is one import line).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 viacells, 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.