A window opened with reaktor_window_open now runs as its own App: an input queue that takes one change a frame, a wake of its own, its keys and dropped files through the key hook and file_opened with its App, animations scoped to it, and its accessibility tree served to UI Automation under its own handle (NSAccessibility and AT-SPI still serve the main window only). Closing one frees its layout, undo, icon cache and queue, and one closed while its file picker is open is kept until the picker answers. reaktor_set_title retitles the window whose App it gets, and a theme set from any window applies to every window. Nuklear's own rounded fills are swapped for masks once the command list is built, so fill anti-aliasing stays off on every renderer without jagged corners on the GPU ones. GTK's setlocale under the tray is undone, stylesheets parse under the C numeric locale, and cssflat reads and writes numbers and colors without the locale, clamping NaN and huge channels. A font is checked table by table before stb_truetype sees it, and a --font that cannot be read falls back to Aileron. A missing icon draws as nothing rather than a white square, and an icon-only button draws its icon through its CSS look. On the web, the page's key event no longer takes the event type every wake pushes. The BSD jobs: SDL's dlopen notes are left out on the BSDs, as OpenBSD refuses a program whose note segment passes 1 KB; libm is linked into every target on Unix rather than plutovg alone; and the smoke run picks its video driver with the new --video flag instead of an environment variable. .confirm_close and reaktor_set_confirm_close ask a question in a modal floater, with Cancel and Quit, before a quit that closing could refuse, bringing a minimized window back to ask it; the showcase's Popups page turns it on. The sidebar takes copy-outline for Layout, chatbubble-outline for Popups and color-fill-outline for Styling. Comments are trimmed again to the ones that guard a trap, the screenshots are retaken, and PERFORMANCE.md's module sizes and UI Automation count are measured again. Verified: the seven tests pass, the 24 launchtest hold probes match the last run, and new launchtest modes cover a window's keys, drops, animation, title, theme, wakes, one change a frame, a drag, 200 open-and-close cycles, its picker and a close under it, and the question both answered and canceled. Each step was diffed against the previous sweep of every page in both themes; the last differs only by the Popups page's new section and the Diagnostics page's live numbers, and the accessibility-off build draws byte-identical pixels and dumps. The web build passes its typing harness and the wake, floater and toast checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reaktor
A Nuklear-powered GUI library for C.
Try the showcase in your browser — the same program, built to WebAssembly.
Tired of C having no cross-platform GUI — nothing like Avalonia, Shaft or Freya — and of toolkits that want hundreds of megabytes to put a dialog on screen? I was. So I wrote Reaktor: complete without being big. A 2.3 MB binary, about 10 MB of RAM, and no GPU required.
⚠️ Reaktor is in active development, and breaking changes might occur.
How, and on what, is in PERFORMANCE.md.
Features
- 17 declared widgets — buttons, fields, checks, radios, sliders, knobs, combos, a color picker, a sidebar and tabs among them — with all of Nuklear underneath.
- Layers — dialogs inside the window, toasts, more windows, and an icon in the system tray with a menu.
- Styled by CSS read at run time: color, type, borders, radii, spacing,
:hoverand:active, light and dark. Swap the sheet and the app changes. - Accessible with no code — UI Automation, NSAccessibility, AT-SPI and a DOM subtree on the web, with keyboard navigation throughout.
- Localization — catalogs, plural rules, and numbers, money and dates as each language writes them.
- Text past Latin-1 — direction, shaping, fallback fonts and Unicode line breaking, so Japanese wraps properly.
- Animation — 31 easing curves, keyed per widget.
- Modular — accessibility, localization and text shaping each swap for a stub, and only what they drew stops being drawn.
- Windows, macOS, Linux, the BSDs and WebAssembly from one set of sources, on one software rasterizer, at any display scale.
- Nothing drawn at rest — 0% of a core while it sits there.
Build
CMake, the submodules and a C11 compiler: Reaktor is C99, but mojibake, which the Text module uses, is C11.
git clone --recursive https://github.com/Alpaq92/Reaktor
cd Reaktor
./build.sh # build.ps1 on Windows
./build/showcase
./build-wasm.sh (build-wasm.ps1 on Windows, with
emsdk) builds the web versions into build-wasm/, to
be served over HTTP.
Usage
static char name[64];
static int len;
REAKTOR_COLUMN(.gap = 10) {
reaktor_label(&(reaktor_label_spec){ .text = "What is your name?" });
reaktor_field(&(reaktor_field_spec){
.buf = name, .len = &len, .cap = sizeof name, .hint = "Ada" });
if (reaktor_button(&(reaktor_button_spec){ .label = "Say hello" }))
printf("Hello, %s!\n", name);
}
No colors, radii, padding or font sizes: they come from a stylesheet read at startup. Nothing for screen readers either: each widget reports its own name, value and position.
Made of
Nuklear draws the widgets. SDL3 supplies the window, input, tray and software renderer. libcss, from LCUI, parses the stylesheets, and Onlay, a fork of randrew/layout, computes the rectangles. Every dependency is a submodule, used as it ships; the full list is in NOTICE.md.
Documentation
- DOCUMENTATION.md — the whole of it: every widget, layout and layer, styling, then how it works inside.
- DEMO.md — the four programs in this repository.
- PERFORMANCE.md — what it costs, measured.
- BENCHMARKS.md — the comparison, as runnable projects.
- NOTICE.md — dependencies and licenses.
License
MIT. The dependencies keep their own — see NOTICE.md.
