Cosmoe: New C++ toolkit for building native Wayland apps
New UI library has 23 years of history – and unexpected roots
Cosmoe is a modern C++ UI library, but it's also a new iteration of a project with roots in one of the most elegant GUIs ever written.
Cosmoe pulls off several neat tricks. Although it's a newly announced project, it is surprisingly mature and complete, while being lightweight. Also, for a one-man project, it has pretty good existing third-party documentation, and quite a lot of existing example code – even complete apps. It's a new project and there is, admittedly, a to-do list of stuff that doesn't work right yet, but at 112 lines it's fairly small.
Cosmoe Wayland is a set of C++ libraries, with supporting infrastructure and tools, plus style guides and so on. It needs no supporting programs or runtime, and lets developers build multithreaded Linux apps in C++ that natively target Wayland. Although it's new, it has well-established guidelines and a distinctive, fresh, and clean look and feel. The API is complete and stable, and fairly unlikely to undergo radical changes, as it follows standards first released just under 30 years ago.
This iteration of Cosmoe is a surprisingly novel implementation of a project to recreate BeOS on top of the Linux kernel, now called Cosmoe Classic. Cosmoe Classic started out as a port of the userland of AtheOS to the Linux kernel. Over time, the original Cosmoe evolved into an effort to implement a BeOS-compatible OS on top of a Linux kernel. After Be Inc. shut down in 2002, there were a few of these – another was Blue Eyed OS.
Then, as the project history describes, developer Bill Hayden found that life got in the way. Ironically, the last update, in 2007, was titled "Cosmoe is back."
Today, there's only one FOSS reimplementation of BeOS – Haiku OS, which we last looked at in January. Cosmoe is no longer a rival, although Hayden has done a few updates to Cosmoe Classic and you can now build it on recent Ubuntu LTS versions or Fedora 40.
This is an interesting idea. Haiku's continued existence demonstrates that there's still considerable nostalgia for BeOS. There are precedents for bringing the BeOS look to Linux, including Metsatron's theme and icon pack for Xfce, or the Benu and Haiku themes for Pekwm. There was even an entire distro, ZevenOS, of which the modern Neptune OS is a remote descendant. Some BeOS apps got ported to Windows, too – The Reg FOSS desk's Windows boxes run Process Controller by k23 productions, which is a direct port of a BeOS app.
- Mozilla rolls out Firefox 140 with ESR status and fresh features
- Xlibre forks to the rescue – but Kubuntu gives X11 the boot
- Tiling terminal multiplexers for the console connoisseur
- Breaking the nerd internet: Three overlapping generations of tech history – in one selfie
Cosmoe-Wayland is a new entrant in the field of FOSS UI toolkits, and as such, it's up against some entrenched opposition. The commercially backed Qt is a major player, but vastly bigger and more ambitious, cross-platform and cross-GUI. In the pure-FOSS space, Gtk is the 800-pound gorilla, but it's built for GNOME (and C) and is strongly opinionated. It discourages themes, and as we discussed with FLTK 1.4, Gtk 4 deprecates fusty old-fashioned tech like menu bars. Gtk 4 is intended for writing apps for GNOME 4x, and we find that as a result, while they look very distinctive, the UI is restrictive, and it looks badly out of place on any other OS or desktop. It says a lot that Gtk was originally built for GIMP, but this year's GIMP 3 uses Gtk 3. (GIMP fans may be interested to know that GIMP 3.2 is on the way.)
Although Hayden claims "Cosmoe implements about 95 percent of the BeOS API currently," it's still much smaller and simpler than its big-name rivals, and yet arguably more modern and complete than, say, FLTK or Xforms. In principle it could also be used to build apps for Linux and Haiku simultaneously, as well as porting Haiku code to Linux. We definitely would love to see an OpenTracker-based desktop.
Plus, of course, there's also the killer advantage mentioned in Mote's comment on OSnews's article on this release:
Adding the Haiku library to Linux will ensure Linux won't become irrelevant due to a lack of applications.
Outside of KDE and GNOME, there are few other cohesive native toolkits for Wayland development. There are lots of components but little unification. This is an interesting and different approach to take, and we hope it succeeds. ®
Bootnote
The Register covered AtheOS back in 2001, albeit describing it somewhat inaccurately. After lone developer Kurt Skauen moved on to other things, his AtheOS project was forked to create Syllable OS, which continued for another decade and reached version 0.6.7. We mentioned it on The Reg the following year. ®