Action is used to encode parsed terminal output and shuttle it between the thread that does the parsing and the main gui thread that applies it to the terminal model. Take it down from 184 bytes to 40 bytes (on 64-bit systems). This seems to boost `time cat bigfile` by reducing the runtime to ~40% of its prior duration: down from 8s -> 4.5s on an M1 macbook air. Size reductions achieved by Box'ing relatively less frequently used enum variants. The kitty image data variant is particularly large, and the Window variant is also pretty heavy.
wezterm-term
This crate provides the core of the virtual terminal emulator implementation used by wezterm. The home for this crate is in the wezterm repo and development is tracked at https://github.com/wez/wezterm/.
It is full featured, providing terminal escape sequence parsing, keyboard and mouse input encoding, a model for the screen cells including scrollback, sixel and iTerm2 image support, OSC 8 Hyperlinks and a wide range of terminal cell attributes.
This crate does not provide any kind of gui, nor does it directly
manage a PTY; you provide a std::io::Write implementation that
could connect to a PTY, and supply bytes to the model via the
advance_bytes method.
The entrypoint to the crate is the Terminal struct.
License: MIT