RtlZeroMemory / Rezi
Rezi — TypeScript TUI, Near-Native Performance. Powered by deterministic C engine.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing RtlZeroMemory/Rezi in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewRezi TypeScript TUI, Near-Native Performance. High-level developer experience powered by a deterministic C rendering engine. Website · Docs · Quickstart · Widgets · API · Benchmarks --- > **Status: Pre-alpha** — under active development and changing rapidly. Public APIs, ABI expectations, and behavior may change between releases, and Rezi is not yet recommended for production workloads. --- What Rezi Can Do Rezi is a high-performance terminal UI framework for TypeScript. You write declarative widget trees — a native C engine handles layout diffing and rendering. • **56 built-in widgets** — layout primitives, form controls, data tables, virtual lists, navigation, overlays, a code editor, diff viewer, and more • **Canvas drawing** — sub-character resolution via braille (2×4), sextant (2×3), quadrant (2×2), and halfblock (1×2) blitters; draw lines, shapes, and gradients within a single terminal cell grid • **Charts & visualization** — line charts, scatter plots, heatmaps, sparklines, bar charts, gauges, and mini charts — all rendered at sub-character resolution • **Inline image rendering** — display PNG, JPEG, and raw RGBA buffers using Kitty, Sixel, or iTerm2 graphics protocols, with automatic blitter fallback • **Terminal auto-detection** — identifies Kitty, WezTerm, iTerm2, Ghostty, Windows Terminal, and tmux; enables the best graphics protocol automatically, with env-var overrides for any capability • **Performance-focused architecture** — binary drawlists + native C framebuffer diffing; benchmark details and caveats are documented in the Benchmarks section • **Ink compatibility layer** — run existing Ink CLIs on Rezi with minimal changes (import swap or dependency aliasing), plus deterministic parity diagnostics; details: Porting guide · Ink Compat architecture • **JSX without React** — optional maps JSX directly to Rezi VNodes with zero React runtime overhead • **Deterministic rendering** — same state + same events = same frames; versioned binary protocol, pinned Unicode tables • **Hot state-preserving reload** — swap widget views or route tables in-process during development without losing app state or focus context • **Syntax tokenizer utilities** — shared lexical highlighters for TypeScript/JS/JSON/Go/Rust/C/C++/C#/Java/Python/Bash with custom-tokenizer hooks • **Advanced deterministic layout** — intrinsic sizing, / , , wrapped text layout, grid spans/explicit placement, absolute positioning, and stability-signature relayout skipping • **6 built-in themes** — dark, light, dimmed, high-contrast, nord, dracula; switch at runtime with one call • **Declarative animation APIs** — numeric hooks ( , , , ) and transition props for position/size/opacity motion • **Record & replay** — capture input sessions as deterministic bundles for debugging and automated testing --- Showcase EdgeOps Control Plane A production-style terminal control console built entirely with Rezi. Visual Stress Test Image Rendering --- How It Works You write declarative widget trees in TypeScript. Rezi computes layout and emits a compact binary drawlist (ZRDL). A native C engine — Zireael — diffs framebuffers and writes only changed cells to the terminal. Most JavaScript TUI frameworks generate ANSI escape sequences in userland on every frame. Rezi moves the hot path out of JavaScript — rendering stays ergonomic at the top and fast on real workloads. --- Benchmarks 22 scenarios across primitive workloads (tree construction, rerender, layout), terminal-level rendering (full PTY write path), and full-app UI composition. All 8 frameworks run in PTY mode. Representative numbers Numbers from a single-replicate full run on Apple M4 Pro (macOS arm64, PTY mode). Directional, not publication-grade. | Scenario | Rezi | Ink | OpenTUI Core | Ratatui | blessed | |---|---:|---:|---:|---:|---:| | rerender | 330µs | 19.22ms | 1.26ms | 70µs | 39µs | | tree-construction (100 items) | 153µs | 24.16ms | 1.51ms | 913µs | 1.70ms | | tree-construction (1000 items) | 1.31ms | 79.60ms | 17.35ms | 2.33ms | 19.14ms | | terminal-full-ui | 1.14ms | 22.34ms | 1.32ms | 258µs | 314µs | | terminal-strict-ui | 873µs | 22.14ms | 1.27ms | 183µs | 302µs | | terminal-virtual-list (100K) | 644µs | 22.32ms | 1.28ms | 121µs | 124µs | | scroll-stress (2000 items) | 6.99ms | 182ms | 32.58ms | — | — | Rezi is the fastest TypeScript/JavaScript framework across all measured scenarios. terminal-kit, blessed, and Ratatui are lower-level libraries (no layout engine or no widget system); they are faster on primitive output scenarios, and slower or absent on workloads requiring structured layout and widget composition. Memory at terminal-full-ui (peak RSS) | Framework | Peak RSS | |---|---| | Ratatui | 2.9 MB | | Rezi | 129 MB | | OpenTUI (Core) | 131 MB | | blessed | 260 MB | | Ink | 301 MB | | OpenTUI (React) | 1,010 MB | Running benchmarks See BENCHMARKS.md for full results, all scenarios, scenario definitions, methodology caveats, and advanced run options. --- Quick Start Get running in under a minute: Or with Bun: Starter templates: **dashboard**, **stress-test**, **cli-tool**, **animation-lab**, **minimal**, and **starship** (command console). --- Example API Beautiful Defaults When the active theme provides semantic color tokens, Rezi uses design system recipes by default for: , / , , , , and . • Use on buttons for common “primary/danger/link” patterns. • Use on (or / ) for consistent container defaults. • Use manual props to override specific attributes (they do not disable recipes). Docs: Design System · Migration: Beautiful Defaults Install: --- JSX (No React Runtime) maps JSX directly to Rezi VNodes. --- Features **56 built-in widgets** — primitives (box, row, column, text, grid), form inputs (input, button, checkbox, select, slider), data display (table, virtual list, tree), navigation (tabs, accordion, breadcrumb, pagination), overlays (modal, dropdown, toast, command palette), advanced (code editor w…