9 unstable releases

0.6.2 Aug 2, 2022
0.6.1 Apr 7, 2022
0.6.0 Dec 22, 2021
0.5.0 Apr 14, 2021
0.1.0 Jun 30, 2019

#290 in Hardware support

Download history 15016/week @ 2023-08-15 25587/week @ 2023-08-22 13711/week @ 2023-08-29 18093/week @ 2023-09-05 12188/week @ 2023-09-12 10089/week @ 2023-09-19 10677/week @ 2023-09-26 8452/week @ 2023-10-03 10609/week @ 2023-10-10 11402/week @ 2023-10-17 12073/week @ 2023-10-24 9603/week @ 2023-10-31 9846/week @ 2023-11-07 8063/week @ 2023-11-14 7742/week @ 2023-11-21 9129/week @ 2023-11-28

36,205 downloads per month
Used in 25 crates (via termwiz)

MIT license



This is an implementation of a parser for escape and control sequences. It is based on the DEC ANSI Parser.

It has been modified slightly to support UTF-8 sequences.

vtparse is the lowest level parser; it categorizes the basic types of sequences but does not ascribe any semantic meaning to them.

You may wish to look at termwiz::escape::parser::Parser in the termwiz crate if you're looking for semantic parsing.

Comparison with the vte crate

vtparse has support for dynamically sized OSC buffers, which makes it suitable for processing large escape sequences, such as those used by the iTerm2 image protocol.


An implementation of the state machine described by DEC ANSI Parser, modified to support UTF-8.

This is sufficient to broadly categorize ANSI/ECMA-48 escape sequences that are commonly used in terminal emulators. It does not ascribe semantic meaning to those escape sequences; for example, if you wish to parse the SGR sequence that makes text bold, you will need to know which codes correspond to bold in your implementation of VTActor.

You may wish to use termwiz::escape::parser::Parser in the termwiz crate if you don't want to have to research all those possible escape sequences for yourself.