Toolkit · Terminal UI engine · v0.6.0

AbstractTUI

AbstractTUI is a reactive, compositor-grade terminal UI engine for Rust: fine-grained signals, layered rendering with damage tracking, a streaming chat feed and Markdown, 26 themes, images and software-rendered 3D, all in the terminal. It is the engine behind the AbstractCode terminal client and the terminal consoles of AbstractGateway and AbstractCore, and you can build your own terminal apps on it.

cargo add abstracttui

The terminal, composed

Reading a signal inside a view tracks it; writing one re-runs exactly the computations that depended on it, and those repaint exactly the screen regions they own. Damaged regions go through a compositor (z-ordered layers, alpha, per-layer offset and opacity) and a frame diff, so an idle app emits zero bytes and a blinking cursor repaints one cell.

Who builds on it

The AbstractCode terminal client (abstractcode 0.7.1, on AbstractTUI 0.6.0), the AbstractGateway terminal console (abstractgateway-console) and the AbstractCore terminal console (abstractcore-console), both on AbstractTUI 0.3.6. See the consoles.

abstractcodeabstractgateway-consoleabstractcore-console

Austere dependencies

unicode-width, unicode-segmentation, miniz_oxide, plus libc on Unix or windows-sys on Windows. ANSI output, input parsing, layout, signals, PNG/JPEG decoding, glTF parsing and the 3D rasterizer are implemented in the crate.

MITRust 1.87+

Where it runs

macOS and Linux are verified, with live pseudo-terminal tests. Windows is best effort: it compiles cleanly for MSVC and the library suite runs in CI on Windows, without a live Windows console run.

macOSLinuxWindows (best effort)

Everything a terminal app needs

Widgets

Widgets and layout

Buttons, inputs, a multiline TextArea composer with history and completion, selects and comboboxes, sortable tables, tabs, modals, toasts, a file picker, and the app shell: PageHost, Drawer and DrawerDock, arranged by a flexbox-style solver and a track grid.

Chat

Transcripts and documents

Feed renders append-only conversations and logs; streaming Markdown re-typesets only the open block per token, tables included. MarkdownView adds a heading outline and find-in-document. A tail follows new output until you scroll.

Themes

26 themes

Catppuccin, Tokyo Night, Nord, Dracula, Gruvbox, Solarized and the Abstract originals, over 36 semantic tokens audited against WCAG contrast floors, swapped at runtime through one signal; ThemeSwitcher is the drop-in chip.

Input

Input everywhere

Keyboard and mouse, the kitty keyboard protocol, bracketed paste hardened against huge or hostile input, and a file-drop classifier, so a file dropped on the terminal becomes an attachment. Push-to-talk and live audio meters for voice apps.

Graphics

Images and 3D

PNG, JPEG and GIF through kitty graphics, iTerm2, sixel or Unicode mosaics, chosen automatically with every fallback labeled; animated GIF and APNG; GLB models rendered by a software rasterizer, with no GPU.

Testing

Headless tests and screenshots

Drive the real rendering pipeline against a captured terminal and assert on the screen, with no pty; export any screen as plain text, replayable ANSI or SVG. Graphs and Mermaid diagrams come as extension crates.

Your first terminal app

Fifteen lines and one import. Tab focus, Enter activation and Ctrl+C quit are defaults, and only the count line repaints when the signal changes.

cargo add abstracttui
cargo add abstracttui-graph      # 0.2 — graph auto-layout + GraphView
cargo add abstracttui-mermaid    # 0.2 — mermaid subset renderer
use abstracttui::prelude::*;

fn main() -> abstracttui::base::Result<()> {
    App::simple(|cx| {
        let count = cx.signal(0);
        Element::new()
            .style(LayoutStyle::column())
            .child(dyn_view(LayoutStyle::line(1), move || {
                text(format!("count: {}", count.get()))
            }))
            .child(Button::new("+1").on_click(move || count.update(|c| *c += 1)).view(cx))
            .child(text("Tab focuses · Enter clicks · Ctrl+C quits"))
            .build()
    })
}
git clone https://github.com/lpalbou/abstracttui
cd abstracttui
cargo run --example dashboard
# 35 runnable programs, from hello.rs to transcript.rs (streaming markdown chat) and viewer3d.rs
Reference: getting started, API, theming, graphics and 3D, live data. For web apps, the counterpart is AbstractUIC.