Skip to content

Releases: nativelite/vterm-rs

nativelite-vterm 0.5.5

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 19 Oct 01:17
v0.5.5
affda5d

Added

  • cargo bench --bench feed_throughput: a standard-library-only benchmark
    of Term::feed, in benches/, over generated streams: plain ASCII, agent
    output, SGR-heavy text, cursor redraws, UTF-8, a mix of those, and the agent
    stream into Term::with_history. Median MiB/s of five runs, about 4 s in
    release. benches/README.md says what each number means, has this
    release's results, and names where every performance figure in this
    changelog came from. The 0.5.4 entry below now says which of its figures
    came from a harness outside this repo, beside the bench's own number.

Fixed

  • A restored terminal keeps its scrollback capacity. Term::restore built
    a terminal with no history, so one made by Term::with_history came back
    with history_capacity() 0 and never recorded a scrolled-off line again.
    Checkpoint format 4 carries the capacity — the line count and the byte cap
    (set_history_bytes) — and a restored terminal starts with an empty history
    that fills as it scrolls and holds through a resize. The lines themselves are
    still not in a checkpoint: they belong to whoever keeps the checkpoints.
    Older checkpoints restore as before, with no capacity. A restore also leaves
    runs of the blank cell unwritten, as they were, so a restored screen's blank
    rows do not scroll into the history as lines the original never recorded.

nativelite-vterm 0.5.4

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 19 Oct 00:18
v0.5.4
09f8a2f

Added

  • Mouse tracking modes (?1000, ?1002, ?1003, and ?1006 SGR
    encoding): Term::mouse_tracking (MouseTracking::Off/Click/Drag/Motion)
    and Term::mouse_sgr, so a host knows when a program wants the mouse
    reported. Not kept in checkpoints: a restored screen starts with it off.

Changed

  • Plain text is written straight into the screen (ansi::Screen::write_ascii)
    instead of through a scratch buffer of cells. With ansi's lazy row
    clearing and faster UTF-8 decoding, Term::feed on agent output (177x47)
    went from 188 to 330 MiB/s.
  • The ASCII check on text runs is a word-wide is_ascii, since the parser
    never passes controls in text. With ansi's faster text skip, Term::feed
    is now 570 MiB/s on the same workload.
  • Plain ASCII text skips UTF-8 decoding when no character is half-received
    (ansi::Utf8Decoder::is_idle): 570 -> 631 MiB/s.

Added

  • Scrollback: Term::with_history(rows, cols, lines) keeps up to lines
    lines scrolled off the primary screen (ansi::Screen::with_history), read
    through Term::scrollback(). It survives a resize; ESC [3J erases it; the
    alternate screen and scroll regions never add to it. in_alternate_screen()
    tells a host when scrolling back does not apply. Synchronized-output
    snapshots copy the visible rows only.
  • New line mode (LNM, CSI 20 h / CSI 20 l): while set, LF, VT and FF
    also return to column 0. For hosts feeding output from plain pipes, where no
    tty turns LF into CR LF. Kept in checkpoints (flag bit 7; older checkpoints
    restore with it off).

Added

  • Checkpoints: Term::checkpoint() and Term::restore(). A terminal's
    whole state as bytes and back: both screens, cursor, style, scroll region,
    tab stops, saved cursor, modes and a synchronized update in progress.
    Feeding a restored Term the rest of a stream ends in exactly the state of
    one that never stopped — tested at every split point of a stream exercising
    all of that state, and across chunked feeds.
    • Taken only between sequences (Term::can_checkpoint(), via
      ansi::Parser::is_ground()), so the tokenizer never needs saving.
    • Versioned, run-length encoded, and validated on restore: damaged bytes are
      an error (RestoreError), never a panic.
    • Measured (release, i5-12600K): 24x80 full of coloured build output,
      19.7 KB, save 23 us, restore 63 us; 50x200, 42.1 KB, 111 us / 93 us.

nativelite-vterm 0.4.0

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 17 Sep 15:46

a minimal terminal-emulator core

A cursor semantics change: a wide glyph now advances the cursor by two.

  • Width-aware print: CJK, fullwidth and emoji are laid out as two-column cells. A wide glyph at the right edge wraps whole, or is dropped with autowrap off, and is never split.
  • Term::take_dirty tells a host whether the screen changed, so an unchanged pane can skip compositing.
  • Requires nativelite-ansi 0.2 and depends on nativelite-uwidth 0.1.

Published 2026-09-12; these notes were added later. See the CHANGELOG.

Install: cargo add nativelite-vterm@0.4.0
crates.io: https://crates.io/crates/nativelite-vterm

Zero third-party dependencies: the Rust standard library plus the nativelite ansi and uwidth crates. MIT licensed.

nativelite-vterm 0.5.2

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 16 Sep 01:10

A run of plain ASCII is now blitted into the screen rather than written cell by cell. Terminal output is overwhelmingly plain ASCII, and every character used to cost a width lookup, a buffer re-borrow, a cursor read and write, and a bounds-checked cell write — 14.6 million of them for a 16 MB log.

Feeding 16 MB of coloured log output at 40x160: 66.0 -> 173.1 MB/s on Linux (54.0 -> 89.6 on Windows). Applying tokens dropped from 0.177 s to 0.034 s, so parsing is now 81% of the emulator's time.

Anything the fast path does not cover — a pending wrap, a wide or zero-width glyph, a control byte, the last column of a row — still goes through the per-character path unchanged. No API change.

nativelite-vterm 0.5.1

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 16 Sep 00:25

Feeding output is about 6x faster: scrolling goes through ansi::Screen::scroll_rows_up/scroll_rows_down instead of moving cells one at a time, and scrolling is what a terminal does on nearly every line of output.

16 MB of coloured, agent-style log output into one Term, on Linux:

grid 0.5.0 0.5.1
24x80 16.1 70.2 MB/s
40x160 11.0 66.0 MB/s
60x240 5.3 63.8 MB/s

The cost no longer grows with the grid. Requires nativelite-ansi 0.3.1; no API change here.

nativelite-vterm v0.5.0

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 14 Sep 18:27

a minimal terminal-emulator core

Breaking: requires nativelite-ansi 0.3, whose typed Cursor and CellWidth reach callers through Term::screen() (read the cursor as term.screen().cursor()).

  • One cursor: the active buffer's cursor is the emulator's cursor, carried across alt-screen switches and resizes, instead of a copy mirrored after every token.
  • Fixed: a synchronized-update snapshot opened in the same sequence as an alt-screen switch (?1049;2026h) reported (0,0) instead of the live cursor.
  • Docs no longer list wide/CJK glyphs as out of scope.

See the CHANGELOG.

Install: cargo add nativelite-vterm
crates.io: https://crates.io/crates/nativelite-vterm

Zero third-party dependencies: the Rust standard library plus the nativelite ansi and uwidth crates. MIT licensed.

nativelite-vterm v0.3.0

Choose a tag to compare

@JSBtechnologies JSBtechnologies released this 07 Sep 03:14

a minimal terminal-emulator core

Install: cargo add nativelite-vterm
crates.io: https://crates.io/crates/nativelite-vterm

Zero third-party dependencies, Rust standard library only. MIT licensed.