MicroUI is a complete GUI library in ~1100 lines of C that draws nothing itself
rxi's MicroUI fits an immediate-mode UI toolkit — windows, sliders, scrollable panels, word-wrapped text — into about 1100 lines of ANSI C with zero heap allocation. The trick to staying tiny: it never touches the screen. You wire up the rendering.
MicroUI emits a list of draw commands and demands input back; it draws nothing and allocates nothing beyond a fixed memory region. That's how it stays portable enough to compile to WebAssembly and run in a browser.
One longtime user called it his go-to for toy projects but flagged it as effectively abandonware, with a known draw-call bug that does a misaligned pointer access — harmless until you run it under Zig, which panics on exactly that.
A whole UI toolkit that refuses to draw anything
MicroUI, by rxi, is an immediate-mode UI library written in about 1100 lines of ANSI C and released under the MIT license. The feature list is improbably full for the size: windows, scrollable panels, buttons, sliders, textboxes, labels, checkboxes, and word-wrapped text, plus a simple layout system and hooks to add your own controls.
The reason it stays small is what it deliberately leaves out. MicroUI does no drawing. It "expects the user to provide input and handle the resultant drawing commands" — you call UI functions each frame, it hands back a list of rectangles and text to render, and you draw them with whatever you've got. It also allocates nothing: the whole library operates inside a fixed-size memory region, no dynamic allocation. Immediate-mode plus bring-your-own-renderer plus no malloc is the entire trick — and it's what makes the library portable enough to drop into almost anything.

The minimalism is real — measured in compressed kilobytes
The most authoritative voice in the thread came from the author of the sokol headers, who wired MicroUI up to his own stack and weighed the result against the alternatives:
"I wrote a little demo to run microui on top of the sokol headers … it's really interesting in how minimal it is. … microui sample: 79.6 KBytes compressed download. Nuklear sample: 155 kb compressed." — floooh, author of the sokol libraries
That the demo runs in a browser at all is its own small marvel. "Cool to see a demo in there that you can run in a browser, presumably compiled to WebAssembly," one commenter wrote — "the kind of thing that was unimaginable years ago." The portability claim is the recurring question, though, voiced by a developer who couldn't square the circle: how is a library both tiny and portable when the C standard library has no graphics at all? The answer is the BYO-renderer model — MicroUI offloads exactly that platform-specific weight onto you.
The asterisk: it's quietly abandonware, with a real bug
The sharpest practical warning came from someone who's shipped it for years:
"This has been my goto for personal toy projects for a while now. … I will mention, however, it's kinda abandonware at this point. There is some bug with the draw call iterator which does a misaligned pointer access, which, if your environment is set up to catch that, can get annoying (Zig for example panics on it). … all the forks I tried were subtly wrong." — a developer who's used it across many projects
The gaps people probe are consistent: text rendering (do you bring your own glyph atlas?), and the missing window-system glue. "The hard part seems to be missing: interfacing with an actual window system — X11, TUI, WIN32," wrote a commenter who wanted the platform layer included. And the reflexive filter for any UI library showed up too: "The first thing I look for in any UI library is accessibility support. Makes it trivial to filter out toy projects," noted a developer using a11y as a maturity test.
Tiny by drawing a hard line around its job
MicroUI is small because it answered "what does a UI library have to do?" with the narrowest possible answer: track widget state, compute layout, emit draw commands. Everything else — pixels, fonts, the window, accessibility — is your problem. That's a feature for embedding it into a Raylib debug menu or a one-off cross-platform tool, and a wall if you wanted a batteries-included toolkit. It's also, by its most loyal users' own account, not actively maintained — so the right way to adopt it is as a 1100-line file you're prepared to own, bug and all.
Get breakdowns like this every day
The top Hacker News stories, unpacked — by email, Telegram, or RSS.
Why a Walnut Creek apartment block can't fit one 3-bedroom unit
Kevin Burke lays a proposed California apartment building next to a Copenhagen courtyard block and asks why the codes guarantee dark, single-aspect units. The HN thread's top comment is about cars.