Less known desktop UI frameworks
Writing desktop software is hard. The UI technologies of Windows or MacOS are awful compared to web technology.
What can trivially be done with HTML/CSS/JavaScript in few minutes can take hours using Windows’s win32 APIs or Mac’s Cocoa.
That’s why the default technology for desktop apps, especially cross-platform, is Electron: a Chrome browser combined with Node runtime.
The problem is that it’s bloaty: each app is a unique build of Chrome with a little bit of application code. Chrome is over 100MB so many apps ship less than 1MB of code in a 100M wrapper.
People tried to address the problem of poor OS APIs by writing UI frameworks, often meant to be cross-platform.
You’ve heard about QT, GTK, wxWindows.
The problem with those is that they are also old, their APIs are not the greatest either and they are bloaty as well.
There just doesn’t seem to be a good option.
Writing your own framework seems impossible due to the size of task.
But is it?
I’ll show a couple of less-known UI frameworks written mostly be a single person, often done simply to enable writing an application.
SWELL in WDL
WDL is interesting. Justin Frankel, the guy who created Winamp, has a repository of C++ code he uses in different projects.
After selling Winamp to AOL, a side quest of writing file sharing application, getting fired from AOL for writing file sharing application, he started a company building
Reaper a digital audio workstation software for Windows.
Winamp is a win32 API program and so is Reaper. At some point Justin decided to make a Mac version but by then he had a lot of code heavily using win32 APIs.
So he did what anyone in his position would: he implemented win32 APIs for Mac OS and Linux and called it SWELL - Simple Windows Emulation Layer.
Ok, actually no-one else would do it. It was an insane idea but it worked.
It’s important to not over-state SWELL capabilities. It’s not Wine. You can’t take any win32 program and recompile for Mac with SWELL.
Frankel is insanely pragmatic and so is his code. SWELL only implements the subset of APIs he uses in Reaper.
At the same time Reaper is a big app so if SWELL works for Reaper, it could work for your app.
Sublime Text
It was written by a single developer in C++ and he wrote a
custom UI toolkit for it. Not open source but its existence shows it can be done.
10x Editor
Less known that Sublime Text,
10x Editor is a Windows only editor specialized for large C/C++ code bases.
RAD Debugger
RAD Debugger is an open-source Windows debugger for C/C++ apps written in C by mostly a single person.
The UI is integral part of the the app but the code is well structured so you probably can take just their UI / render code and use it in your own C / C++ app.
Currently the app / UI is only for Windows but it’s designed to be cross-platform and they are working on porting the renderer to Mac OS / Linux.
They use permissive MIT license and everything is written in C.
Dear ImGUI
Dear ImGui is a newer cross-platform, UI framework in C++. Open source, permissive MIT license.
Written by mostly a single person.
Ghostty
Ghostty is a cross-platform terminal emulator and UI. It’s written in Zig by mostly a single person and uses it’s own low-level
GPU renderer for the UI.
You too can write your own UI framework
At first the idea of writing your own UI framework seems impossibly daunting.
What I’m hoping to show is that if you’re ambitious enough it’s possible to build cross platform desktop apps that are not just bloated 100MB Chrome wrappers around few kilobytes of custom code.
I’m not saying it’s a simple thing, just that enough people did it that it’s possible.
It shouldn’t be necessary but both Microsoft and Apple have tragically dropped the ball on providing decent, high-performance UI libraries for their OS.
Microsoft even writes their own apps, like Teams, in web technologies.
Thanks to open source you’re not at the staring line.
You can just use Dear ImGUI or WDL’s SWELL.
Or you can extract the UI code from RAD Debugger or Ghostty (if you write in Zig).
Or you can look at how their implementation to speed up your own design and implementation.