explaingit

vurtun/nuklear

13,994CAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

Nuklear is a minimal single-header C library for building immediate-mode GUIs, buttons, sliders, and windows, that outputs a list of shapes for your app to draw, with no rendering or platform code included. Note: this repo is unmaintained, active development is at the community fork.

Mindmap

mindmap
  root((Nuklear))
    What It Does
      Immediate mode GUI
      Shape list output
      No rendering included
    Features
      Single header file
      No dependencies
      UTF-8 text support
    UI Elements
      Buttons and sliders
      Checkboxes windows
      Color picker
    Language Bindings
      Java Rust Go
      Python Lua
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a debug or settings GUI panel to a game or graphics app without pulling in a heavy UI framework.

USE CASE 2

Build a lightweight tool window on top of an existing OpenGL, Vulkan, or DirectX renderer.

USE CASE 3

Embed a UI in a constrained C environment where no standard library is available.

Tech stack

C

Getting it running

Difficulty · hard Time to first run · 1day+

You must integrate Nuklear with your own rendering backend (OpenGL, Vulkan, etc.), no standalone renderer is included.

Use freely under either the MIT license or public domain, no restrictions on commercial or personal use.

In plain English

Nuklear is a small toolkit for building graphical user interfaces, the buttons, sliders, checkboxes, and windows that people click on inside a program. It is written in a long-standing version of the C programming language. The first thing the README says is that this particular copy of the project is no longer maintained: all development has moved to a different repository run by the Nuklear community, and activity here is ignored. Anyone planning to use it should go there instead. The library takes a deliberately narrow approach. It does not open windows on your screen, talk to the operating system, or draw anything by itself. Instead it reads simple information about the user's input, such as mouse and keyboard state, and produces a list of basic shapes to draw. Your own program is responsible for showing those shapes using whatever graphics system it already has. This style is known as immediate mode, where the interface is rebuilt every frame rather than kept as a stored set of objects. The README highlights that it has no outside dependencies, can run without even the standard C library if you prefer, keeps memory use low, supports UTF-8 text, and can be fully restyled. It is distributed as a single header file, a common pattern in C where the whole library lives in one file you include in your code. By default that include only brings in the declarations. To get the actual working code you define a specific flag in exactly one of your source files before including it, and the README warns that mismatched settings between includes can cause serious errors. The README shows a short example that creates a window with a button, some option toggles, and a volume slider. It also lists community-made bindings that let you use Nuklear from other languages, including Java, Rust, Go, Python, and Lua. The software is offered under two choices: the MIT license or the public domain.

Copy-paste prompts

Prompt 1
Show me how to integrate Nuklear with an SDL2 and OpenGL3 renderer to display a window with a button and a slider.
Prompt 2
How do I set up Nuklear as a single-header library in my C project? Walk me through the define flag I need and where to put it.
Prompt 3
Write Nuklear C code that creates a settings panel with checkboxes for toggling debug options and a color picker.
Prompt 4
How do I use Nuklear's built-in theming API to change button colors, fonts, and padding to match my application's style?
Prompt 5
Show me the Nuklear input handling loop I need to write to feed mouse clicks and keyboard events into the GUI each frame.
Open on GitHub → Explain another repo

← vurtun on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.