4 ms·
FWIW WezTerm does seem to split much of its "generic terminal" functionality into separate published re-usable crates: * https://lib.rs/gh/wez/wezterm/wezterm
by follower 2y ago
FWIW WezTerm does seem to split much of its "generic terminal" functionality into separate published re-usable crates:
* https://lib.rs/gh/wez/wezterm/wezterm https://lib.rs/gh/wez/wezterm/wezterm / https://crates.io/crates/termwiz https://crates.io/crates/termwiz
(Projects that build on this crate includes "ratatui" among others...)
In particular, I note at least these specific feature areas:
* "support functions for applications interested in either displaying data to a terminal or in building a terminal emulator": https://lib.rs/crates/termwiz https://lib.rs/crates/termwiz
* "to help with parsing input received from a terminal": https://docs.rs/termwiz/latest/termwiz/input/index.html https://docs.rs/termwiz/latest/termwiz/input/index.html
* "Model a cell in the terminal display": https://docs.rs/termwiz/latest/termwiz/cell/index.html https://docs.rs/termwiz/latest/termwiz/cell/index.html
* "parse escape sequences and attach semantic meaning": https://docs.rs/termwiz/latest/termwiz/escape/index.html https://docs.rs/termwiz/latest/termwiz/escape/index.html
* "abstraction over a terminal device": https://docs.rs/termwiz/latest/termwiz/terminal/index.html https://docs.rs/termwiz/latest/termwiz/terminal/index.html
* https://docs.rs/termwiz/latest/termwiz/color/index.html https://docs.rs/termwiz/latest/termwiz/color/index.html
* "cross platform API for working with the psuedo terminal (pty) interfaces": https://lib.rs/crates/portable-pty https://lib.rs/crates/portable-pty
* "Low level escape sequence parser": https://lib.rs/crates/vtparse https://lib.rs/crates/vtparse
So, seems like quite a lot there to help avoid re-inventing the wheel for terminal-related functionality (for andyk/ku1ik & others).
- ku1ik 2y agoht uses asciinema’s avt as the underlying terminal emulator, so there wasn’t much re-invented here really. It was mostly glueing avt, PTY and JSON RPC together.