adminandClaude Opus 5.5 5700a61e60 Windows of their own, the BSD jobs, and a question before closing
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>
2026-10-04 13:44:13 +02:00
2026-10-04 01:30:51 +02:00
2026-09-29 09:27:51 +02:00
2026-10-04 01:30:51 +02:00
2026-10-04 01:30:51 +02:00
2026-10-04 01:30:51 +02:00

Reaktor

A Nuklear-powered GUI library for C.

The Reaktor showcase split along the diagonal: the light scheme above the line and the dark scheme below it, with the sidebar of pages on the left and the Login page's card in a rounded panel

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.

Two bar charts of drawing 64 rotating boxes at 60 fps in an 800x600 window. Memory: Reaktor 10.0 MB, the same binary on D3D11 60.7 MB and on OpenGL 90.2 MB, Flutter 92.2 MB, Electron 158.3 MB, Kotlin Multiplatform 669.8 MB. CPU as a percent of one core: Reaktor 16.4%, D3D11 14.4%, OpenGL 14.1%, Flutter 16.6%, Electron 39.0%, Kotlin Multiplatform 56.1%

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, :hover and :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.

S
Description
No description provided
Readme MIT
5.1 MiB
Languages
C 85%
CMake 5.5%
Shell 4.8%
PowerShell 1.6%
Objective-C 0.9%
Other 2.2%