Roman ChojnackiandClaude Opus 5.5 b5bbe962ed Skip unchanged frames by default
A frame whose draw commands equal the last presented one is skipped, and on
the software renderer a changed frame is redrawn only where it changed, for
every app. The launch field .skip_same_frames becomes .draw_every_frame,
which turns both off; bench sets it so it keeps measuring full frames.

The launch struct an app sees changed, so libreaktor's SOVERSION is now 1,
and the runtime package libreaktor0 becomes libreaktor1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:23:07 +01:00
2026-11-09 14:23:07 +01:00
2026-11-07 13:52:24 +01:00
2026-11-09 14:23:07 +01:00
2026-11-09 14:23:07 +01:00
2026-11-09 14:23:07 +01:00
2026-11-09 14:23:07 +01:00
2026-11-09 14:23:07 +01:00
2026-10-04 01:30:51 +02:00
2026-11-09 14:23:07 +01:00

Reaktor

A Nuklear-powered GUI library for C.

Two Reaktor showcase windows, the light scheme behind and the dark scheme in front: each has the sidebar of pages with its own scheme chosen at the foot, and the front one shows the Login page's card in a rounded panel

Tired of C relying on heavy toolkits that want hundreds of megabytes and a dozen dependencies just to put a dialog on screen? And of small alternatives always lacking crucial features? No? But I was, so I wrote Reaktor: complete without being big. A 2.1 MB binary, 7–13 MB of RAM, and no GPU required.

Try the showcase in your browser — the same program, built to WebAssembly — or download it for Windows, macOS, Linux, FreeBSD, OpenBSD or NetBSD, or as WebAssembly to serve yourself.

⚠️ 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 8.9 MB, the same program on D3D12 120.5 MB and on OpenGL 69.2 MB, Flutter 132.7 MB, Electron 156.3 MB, Kotlin Multiplatform 668.7 MB. Steady-state CPU as a percent of one core: Reaktor 6.3%, D3D12 4.1%, OpenGL 5.5%, Flutter 15.3%, Electron 19.6%, Kotlin Multiplatform 29.4%

How, and on what, is in PERFORMANCE.md.

Features

  • 24 declared widgets — buttons, fields, checks, radios, sliders, knobs, spinners, combos, a color picker, date and time pickers, sidebar, tabs, a menu bar, tables, trees and a splitter, with tooltips; rows drag between lists; all of Nuklear underneath, under Reaktor's names.
  • Layers — menus in windows of their own, in-window dialogs, modal questions, toasts, more native windows, and a tray icon with its own menu.
  • Services — system open, save and folder pickers, timers, main-thread posting, settings that persist, an undo stack, system notifications, and printing and PDF export.
  • 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 — tweens keyed per widget on 31 curves, springs, steps and béziers; keyframed clips staggered across a grid; motion paths, oscillators, noise and shakes; colors blended in five spaces; and text that arrives a glyph at a time, idle once everything settles.
  • Modular — accessibility, localization, text shaping, settings, the tray, popup windows, notifications, printing and the Inspector each swap for a stub at build time, and only what they drew stops being drawn; every other pixel stays.
  • Windows, macOS, Linux, the BSDs and WebAssembly from one set of sources, on one software rasterizer, at any display scale: x86 and ARM everywhere, and RISC-V on Linux (Platforms).
  • 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.

To build your own application, add Reaktor with add_subdirectory and declare it with reaktor_add_app, or take a libreaktor package from the releases and find_package(reaktor): In your own project.

Install

On Linux and the BSDs, one script builds libreaktor as the system's own package (.deb, .rpm, FreeBSD, OpenBSD or NetBSD) and installs it:

sh tools/libreaktor-pkg.sh -i

It lands in /opt/reaktor (/usr/local/reaktor on the BSDs); build against it with -DCMAKE_PREFIX_PATH=/opt/reaktor, or pkg-config with PKG_CONFIG_PATH=/opt/reaktor/lib/pkgconfig. Remove it with the system's package manager: it is libreaktor everywhere. With -s it also builds libreaktor.so and packs three packages instead: libreaktor-sdl3-0 and libreaktor1, which an app needs to run, and libreaktor-shared to build one. libreaktor and libreaktor-shared conflict; install one or the other.

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 and software renderer, and the tray on Windows and macOS; on Linux and the BSDs the tray is Reaktor's, over the D-Bus client gibus. Reaktor's own CSS engine reads the stylesheets, and Onlay, a fork of randrew/layout, computes the rectangles. NukAnim, a port of ImAnim, moves them. 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.
  • FAQ.md — short answers to common questions.
  • 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%