LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Software

A free two-file C toolkit makes desktop interfaces without embedding a browser

Small native applications come with serious decisions about accessibility and text input.

Chris pulls two thick folders open and dozens of buttons spill out onto a sampler.
Illustration: LockerGnome

A desktop interface doesn’t have to bring an entire browser to the party. CUI draws its own controls from C99, with a distribution that can be dropped into a project as cui.h and cui.c. The guest list is refreshingly short, although a small invitation doesn’t mean everybody can get through the door.

The maker’s README describes roughly 190 components, desktop backends and a WebAssembly build. Its stripped Linux hello example is around 250KB. That figure belongs to that example and environment; it isn’t a promise that every program made with the library will occupy the same space.

The library uses an immediate-mode approach: the application describes its interface during frames and receives the resulting interactions. CUI supplies layout, input handling and drawing rather than requiring a browser runtime. Its own demos offer a practical way to inspect the controls before committing to the programming model.

Start there, with the ugliest real screen the intended app needs. A tiny demonstration can look wonderful because nobody has asked it to display a complicated table, accept unfamiliar text input or survive a keyboard-only session yet. The first screen that actually resembles the product is a better audition than the download badge.

The limitations section deserves unusual praise for being plain about those gaps. A mature toolkit’s larger footprint often includes capabilities somebody spent years making dependable. Comparing only executable sizes would quietly erase that work from the calculation, even though users still need it every time they open the program.

Screen-reader access belongs in the initial decision, rather than on a list somebody hopes to revisit after release. Also test the exact languages and keyboard interactions the audience uses. An app that saves space by excluding somebody’s way of entering text has optimized the wrong person’s problem (excellent compression, though).

The project itself points readers toward established toolkits when they need those features today. That makes this an easier choice to discuss honestly. A focused internal utility and a public application can have very different requirements, and neither benefits from pretending the other one is the only valid kind of software.

CUI’s appeal is strongest when a developer can name a narrow interface it already handles well. The two-file delivery removes setup friction, but deciding who can use the finished application still requires the longer conversation.

The project offers a software renderer as well as OpenGL, and a WebAssembly path for browser demos. A small native interface therefore does not require choosing the browser as its desktop runtime.

The browser stayed out of this build.

More Software

Every Software story →