| Crates.io | vtmachine |
| lib.rs | vtmachine |
| version | 0.4.0 |
| created_at | 2024-12-27 03:05:09.699267+00 |
| updated_at | 2025-09-20 04:43:37.193428+00 |
| description | State machine for VT100-like terminal data streams |
| homepage | |
| repository | https://github.com/apparentlymart/rust-vtmachine |
| max_upload_size | |
| id | 1496138 |
| size | 36,854 |
Virtual terminal state machine implementation.
This library provides the lowest-level handling of a virtual terminal stream, recognizing escape sequences and other control characters and delivering them to a caller-provided handler.
For example, given the sequence "\x1b[10;10H" this library can report that
this is a control sequence with function character H and the parameters
[10, 10], but it's up to the provided handler to interpret that as a command
to move the cursor to row 10, column 10.
As with so many libraries like this, the state machine is based on the work of Paul Flo Williams in A parser for DEC’s ANSI-compatible video terminals, though any flaws are mine. This implementation does not aim to be fully compatible with VT100 or its successors. In particular, it implements a Unicode-native machine that does not support legacy character sets.