# CUI brings native desktop UI components to plain C99 with zero dependencies

Original title: CUI – Native UI components for C

> Hacker News story 50430621 · language: en · submitted 2026-11-09
> Web version: https://zeli.app/story/50430621
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 178 · by [hilti](<https://news.ycombinator.com/user?id=hilti>) · 💬 101
[original](<https://yappologistic.github.io/CUI/>) · [HN discussion](<https://news.ycombinator.com/item?id=50430621>)

## Summary

CUI is a native UI toolkit for C99 that ships around 64 complete components — data grids, command palettes, node editors, charts — in a single codebase with no dependencies. It uses an immediate-mode model where components are functions that redraw every frame, so there's no state to sync. A full app weighs about 250 KB and builds a frame in 0.1 to 0.25 ms, running on Win32, Cocoa, and X11.

## Key quote

> Components are functions that draw themselves and return what happened. Your variables are the state, and the whole screen is described again every frame, so there is nothing to keep in sync.

## HN discussion (101 comments)

### [nepthar](<https://news.ycombinator.com/item?id=50431634>)

> Okay, so this is cool, but also vibecoded by someone who just does frontend. I totally support AI development, but the first commit was 4 days ago and it's entirely written by claude. The UI looks like "the style that that AI comes up with" turned into a C framework.
>
> I don't want to discourage this kind of experimentation, but I also question how much of the last 20+ years of UI and C knowledge was not used in the construction of this project. Also, do I want to build a kanban board in C? Unsure.
>
> Just take care when evaluating this for actual usage.

### [zerr](<https://news.ycombinator.com/item?id=50431808>)

> More like custom UI components. Native would have been if you had wrapped e.g. Cocoa NSButton on macOS and Microsoft.UI.Xaml.Controls.Button on WinUI.

### [turtlebits](<https://news.ycombinator.com/item?id=50432558>)

> We need a HN min-release-age flag for posted projects.
>
> Or some flag to ignore users that post these types of projects often.

### [hollowturtle](<https://news.ycombinator.com/item?id=50433742>)

> I click around on mobile nothing happens, vibe coded trash. I’d spend 10 minutes comparing it to Clay but it’s not worth it I already know the result. The problem with this kind of projects is they expire very soon, the least the effort the least the value

### [piker](<https://news.ycombinator.com/item?id=50431357>)

> C increasingly makes sense for compile times if you can have a separate Fable pass on memory safety, etc.

### [badsectoracula](<https://news.ycombinator.com/item?id=50436206>)

> So, i downloaded it, built and tried some demos. On the positive side:
>
> 1. It looks and behaves very polished. From playing around with the gallery the only issues i noticed is that the mouse wheel goes to the "outermost" control instead of the "innermost" and that there isn't a right click / context menu for text input fields with commands like copy, paste, etc (but the common shortcuts do work - including editing shortcuts like home, end, shift+movement, ctrl+d, etc).
>
> 2. According to btop the applications seem to use relatively little memory compared to other apps that look similar (~73MB). Of course it "helps" that other apps that look similar tend to use either Electron or some embedded web browser that balloons memory usage to several hundred MBs :-P.
>
> 3. There are practically no dependencies - even OpenGL seems to be an optional runtime dependence. Using objdump shows that it only depends on libm, libSM, libX11, libXext and -of course- libc. This is neat for self-contained applications.
>
> 4. The files are also relatively small - after stripping debug info from the release binaries (not sure why they're there) the hello world example is ~323KB, most examples (that use richer UIs) are somewhere between 350KB and 400KB and the gallery that contains everything is 1.4MB.
>
> 5. The UIs feel very light and snappy/responsive.
>
> On the negative side:
>
> 1. The apps always seem to use ~4-5% CPU here - this is because they keep drawing the window all the time. Mangohud shows them not capping […]

### [apitman](<https://news.ycombinator.com/item?id=50432647>)

> Since most of my code for work is AI-generated now, I recently started a small side project in part to continue practicing coding by hand, and decided to use C. There's something nice about using a language that's simple enough that I could write/maintain my own compiler if I really had to.
>
> I'm really curious how secure C software would be if reviewed by AI and run exclusively in a WASM runtime.

### [wg0](<https://news.ycombinator.com/item?id=50431228>)

> Looks like ShadCN. That too in C. It's really really elegant.
>
> EDIT: It's immediate mode.

---

## Cite

- Page: https://zeli.app/story/50430621
- Date: 2026-11-09
- Source: yappologistic.github.io (https://yappologistic.github.io/CUI/)
- Hacker News: https://news.ycombinator.com/item?id=50430621

## Other languages

- zh: https://zeli.app/zh/story/50430621 · markdown: https://zeli.app/zh/story/50430621.md
- ja: https://zeli.app/ja/story/50430621 · markdown: https://zeli.app/ja/story/50430621.md
- ko: https://zeli.app/ko/story/50430621 · markdown: https://zeli.app/ko/story/50430621.md
- de: https://zeli.app/de/story/50430621 · markdown: https://zeli.app/de/story/50430621.md
- es: https://zeli.app/es/story/50430621 · markdown: https://zeli.app/es/story/50430621.md
- ru: https://zeli.app/ru/story/50430621 · markdown: https://zeli.app/ru/story/50430621.md
