Nuklear is a single-header ANSI C immediate-mode GUI library designed for embedding user interfaces into applications with minimal dependencies and maximum portability.
The library solves the problem of adding cross-platform UI to C applications without requiring external dependencies or committing to a specific rendering backend. It uses an immediate-mode approach where the UI is rebuilt each frame from scratch, with the library accepting input state and producing draw commands for primitive shapes. Rather than abstracting over multiple platforms and renderers, Nuklear focuses solely on UI logic, leaving rendering and window handling to the caller. This modular design means developers integrate their own rendering backend, whether that is OpenGL, Vulkan, Direct3D, or a software renderer.
Nuklear suits projects that need lightweight, embeddable UI in C without external dependencies, particularly games, tools, and applications where control over memory and rendering is important. The single-header format makes integration straightforward—include the file in header-only mode by default, or define NK_IMPLEMENTATION in one compilation unit to include the implementation. The library is fully customizable and skinnable, supports UTF-8, and has a small codebase of approximately eighteen thousand lines of C89 code. Ready-to-use rendering backends for GLFW, SDL, X11, GDI, Direct3D, and Vulkan are provided in the demo folder to accelerate integration.
The project maintains a stable, minimal codebase with no hidden state and optional compilation of only needed modules. Development activity shows consistent maintenance of the core library and its example implementations across multiple rendering backends.