vtmachine 0.1.0

State machine for VT100-like terminal data streams
Documentation
  • Coverage
  • 47.37%
    18 out of 38 items documented1 out of 1 items with examples
  • Size
  • Source code size: 40.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.55 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • apparentlymart/rust-vtmachine
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • apparentlymart

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.