zetui

STB-style single-header ANSI terminal UI library in C89 with first-class Zig bindings.

Overview

Drop-in header: define ZETUI_IMPLEMENTATION in one translation unit, include everywhere else. Zero external dependencies, POSIX-only. C89 compliant throughout, with its own integer typedefs and an opaque handle that hides struct layout.

Architecture

Application --> zetui_ctx_t (opaque)
                    |-- termios raw mode / POSIX read
                    |-- diff cell buffer --> escape sequence writer
                    |-- SIGWINCH (volatile sig_atomic_t, EINTR retry)

Features

Stack

C89 · Zig · POSIX

Build

Use the header directly from C, or build a static library and Zig bindings with zig build. The build requires Zig 0.16 or newer.

Notes

Built to have a dependency-free TUI layer that works from C89 and Zig without pulling in ncurses or any external runtime.