libs/term
Virtual Terminal Emulator & VT100 Parser
A terminal emulation engine for building command-line user interfaces, REPLs, and embedded terminal widgets. Implements full VT100/VT220/xterm escape sequence parsing, 24-bit TrueColor support, and pty spawning.

High-Throughput Systems Foundation
Engineered to maximize CPU instruction pipelining and data cache locality. Every algorithm avoids heap pointer indirection wherever contiguous stack or arena buffers can be employed.

import "libs/term/emulator.kl" as term;
fn main() -> int32 {
let term_emu: term.Emulator = term.create_emulator(80, 24);
term.feed_bytes(&term_emu, "\x1b[38;2;185;28;28mImperial Crimson Text\x1b[0m\n");
term.render_to_viewport(&term_emu);
return 0;
}Deterministic command-line invocations to build, link native dynamic dependencies, and run automated regression tests:
kale build tests/test_term.kl -o bin/test_term.exe./bin/test_term.exeGPG Key 1B917D4779A6102E • Continuous integration with automated symbol verification.
Handles complex CSI, OSC, and DCS escape sequences reliably without buffer overflows.
Two-dimensional character cell buffer tracking glyphs, foreground/background colors, underline, bold, and italic attributes.
Seamlessly launches child shells (cmd, powershell, bash) and bridges stdin/stdout to terminal buffers.