gitwtfhub

wtf is libui?

andlabs/libui — explained in plain English

Analysis updated 2026-06-24

10,880CAudience · developerComplexity · 4/5Setup · hard

TL;DR

A C library for building desktop apps that look and behave natively on Windows, macOS, and Linux by using each OS's own built-in controls, buttons, menus, dialogs, and more, rather than drawing fake ones. Currently mid-alpha.

Mindmap

mindmap
  root((libui))
    What it does
      Native GUI in C
      Uses real OS controls
      Cross-platform
    Supported controls
      Buttons and text inputs
      Dialogs and menus
      Drawing area
    Current limits
      Mid-alpha status
      No clipboard support
      No drag-and-drop
    Audience
      C developers
      Systems programmers

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

Why would anyone build with this?

REASON 1

Build a small cross-platform desktop utility in C that uses real native controls on Windows, macOS, and Linux without three separate codebases.

REASON 2

Add a native-looking file dialog, progress bar, or settings form to an existing C program.

REASON 3

Create a Go desktop app with native OS controls using libui's Go language bindings.

What's in the stack?

CMeson

How it stacks up

andlabs/libuieclipse-mosquitto/mosquittojemalloc/jemalloc
Stars10,88010,87810,878
LanguageCCC
Setup difficultyhardmoderatehard
Complexity4/53/54/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Mid-alpha: API is still changing, documentation is partial, and key features like clipboard, drag-and-drop, and accessibility are not yet implemented.

Wtf does this do

libui is a library that lets programmers build graphical user interfaces (windows, buttons, menus, text fields, and so on) in C, with the result looking and behaving natively on Windows, macOS, and Linux. Rather than drawing every pixel itself, the library calls each operating system's own built-in interface toolkit, so apps built with it use the same controls that users already see in their system's native applications. The goal is for programs to not just look native but to actually be native at the control level. The library is written in C and is designed to be portable and straightforward to use. It supports a range of common controls: single-line and multi-line text inputs, buttons, checkboxes, radio buttons, dropdowns, sliders, progress bars, date and time pickers, tabs, menus, file and folder dialogs, and a drawing area for custom graphics. A formatted text API allows displaying styled text with different fonts, colors, and sizes. As of the last update in the README, libui is in mid-alpha status. The author is clear that it is not yet feature-complete or fully stable. Several things are explicitly missing or incomplete, including clipboard and drag-and-drop support, printing, accessibility features for the drawing area, OpenGL rendering, and deeper OS integration for document-based applications. The API is still settling down and documentation is partial. The build system is Meson (switched from CMake in April 2019). Bindings exist for other languages including Go, and the README points to the Go documentation as a partial reference. The project is still being actively worked on but has slowed, the README notes it is not dead, just progressing gradually.

Yoink these prompts

Prompt 1
Using libui in C, create a window with a text input, a button, and a message dialog that appears when the button is clicked.
Prompt 2
How do I add a menu bar with File and Edit menus to a libui application that works on all three platforms?
Prompt 3
Set up the libui build system with Meson on Ubuntu and compile a Hello World GUI app in C.
Prompt 4
What controls does libui currently support, and what features like clipboard or drag-and-drop are still missing?
Prompt 5
Show me how to draw custom graphics inside a libui drawing area using the 2D drawing API.

Frequently asked questions

wtf is libui?

A C library for building desktop apps that look and behave natively on Windows, macOS, and Linux by using each OS's own built-in controls, buttons, menus, dialogs, and more, rather than drawing fake ones. Currently mid-alpha.

What language is libui written in?

Mainly C. The stack also includes C, Meson.

How hard is libui to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is libui for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.