← Back
haydentech

haydentech/cosmoe

Cosmoe is a C++ class library that allows developers to build native graphical apps for all major platforms with the powerful but easy-to-use BeOS API, using a single codebase. This library targets Wayland, X11, MacOS, and Windows graphical environments.

View on GitHub ↗https://cosmoe.org ↗
beoscpluspluscross-platformframeworkhaiku-osmacosuser-interfacewayland-clientwindows
Stars
3
Forks
0
Watchers
3
Open issues
1
Contributors
4
Language
C++
License
Other
Default branch
master
Created Oct 1, 2026Updated Oct 1, 2026

Star growth

Today—
This week—
This month—

Star history will appear here once this repo has been tracked for a couple of days.

README

Cosmoe Logo

Welcome to Cosmoe! https://www.cosmoe.org

WHAT IS COSMOE

Cosmoe is a C++ library that allows developers to build rich, easy-to-code apps using the elegant BeOS API. You can target Linux (both X11 & Wayland), MacOS, Windows, and Haiku with one codebase. When targeting MacOS, you can choose a Mac-native menubar or Cosmoe-native in-window menus with a simple compile-time flag.

Cosmoe descends from the Haiku operating system, which itself is an open-source re-implementation of BeOS. Whereas Haiku is a standalone operating system, Cosmoe is a class library that runs on all major operating systems and windowing engines.

This project is beta-level software, but is rapidly approaching maturity. Come join in the project and make it great!

PREREQUISITES

Your system must have the following installed:

Required:

  • gcc or clang compilers
  • meson and ninja
  • bison and flex
  • libpng, libicu, libfreetype, libpango, libfontconfig, libglib development headers/libraries
  • For Linux: libwayland, libpixman, libxkbcommon, libxkbcommon-x11 and associated headers

Optional, but recommended (for image format support):

  • libjpeg (Linux) or jpeg-turbo (Mac)
  • libwebp
  • libtiff
  • libraw
  • libicns
  • If these are not installed, the jpeg, webp, tiff, raw, or icns image translators won't be available

Cosmoe has been compiled and successfully tested under the following operating systems:

  • Ubuntu 24.04 and 26.04
  • Arch Linux
  • Fedora Core 40 through 44
  • macOS 14 and 15
  • WINE 9.0
  • Windows 11

Linux Prerequisites

On Ubuntu/Debian systems, all prerequisites can be installed with:

sudo apt install gcc g++ flex bison libpng-dev libjpeg-dev libwebp-dev libtiff-dev libraw-dev libicns-dev libicu-dev libfreetype6-dev libpango1.0-dev libpixman-1-dev libxkbcommon-dev libwayland-dev pkg-config meson libxkbcommon-x11-dev libxcursor-dev libxrandr-dev libfuse3-dev libx11-xcb-dev

Under Fedora/Redhat, all prerequisites can be installed with:

sudo dnf install gcc g++ flex bison libpng-devel libjpeg-devel libwebp-devel libtiff-devel libraw-devel libicns-devel libicu-devel freetype-devel pango-devel libxkbcommon-devel wayland-devel meson libxkbcommon-x11-devel libXcursor-devel libXrandr-devel fuse3-devel libX11-devel

Under Arch Linux, all prerequisites can be installed with:

sudo pacman -S python meson pkg-config libwebp libtiff libraw libicns gcc binutils make flex bison

macOS Prerequisites

Mac running several Cosmoe-based apps

On macOS, install prerequisites using Homebrew:

# Install Xcode Command Line Tools (if not already installed)
xcode-select --install

# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install build dependencies
brew install meson ninja pkg-config cairo pango libpng jpeg-turbo webp icu4c freetype fontconfig glib

Windows Prerequisites

Windows PC running several Cosmoe-based apps

The Windows version is cross-compiled on Linux or WSL using MinGW64 MXE, and can run in Windows or WINE.

  1. In WSL, install prerequisites and link python
sudo apt install automake autoconf libtool ruby unzip lzip gperf autopoint 7zip intltool libtool-bin python3-mako libssl-dev libpcre2-dev
sudo ln -s /usr/bin/python3 /usr/local/bin/python
  1. Clone MXE:
git clone https://github.com/mxe/mxe.git ~/mxe
  1. Build required MXE packages:
cd ~/mxe
make MXE_TARGETS=x86_64-w64-mingw32.shared \
     gcc cairo pango fontconfig freetype icu4c libpng jpeg libwebp

LINUX BUILD

Cosmoe is built and installed with a standard...

make
make install

The build objects are placed in "builddir" if you need them.

Programs are installed to /usr/local/bin.

MAC BUILD

The Mac build and install is also performed with make and make install.

Since the build requires a case-sensitive volume, make creates a suitable disk image and does the compilation there. You may notice this volume mounted in the Finder.

Command-line programs are installed to /usr/local/bin and graphical programs are installed to /usr/local/Applications. Fonts are installed to ~/Library/Fonts/Cosmoe.

WINDOWS BUILD

The Windows build is a bit more involved. It is cross-compiled in WSL or Linux using MXE (M cross environment).

You need an installed Linux build on the build machine first, since that provides some needed build tools. After that you can build the Windows version:

make
make install

Edit Cosmoe's cross-compilation file cross-mxe.ini to ensure it accurately represents your MXE paths

make windows

On Windows, apps are not installed yet, and the exe's and dll's must be collected into a test folder after building:

./collect-windows-binaries.sh

RUNNING COSMOE APPS

Apps may be started from the commandline or double-clicked in your desktop environment.

Several sample Cosmoe apps are built by this distribution, including:

  • Showcase
  • AboutSystem
  • Terminal
  • StyledEdit
  • Mandelbrot
  • FontDemo
  • Gradients
  • Deskbar
  • Clock
  • Pulse
  • ShowImage
  • DeskCalc
  • Pairs
  • DriveUsage
  • CharacterMap
  • Icon-O-Matic
  • Sudoku
  • Tracker

Note that not all of them work perfectly at the moment. I've listed them roughly in the order of their stability and conformance to their behavior on Haiku. Showcase (formerly Guido) is my testbed for implementing new BeOS API functionality, so it's by far the best example of what Cosmoe can accomplish as a UI library.

You can even try out Cosmoe as a complete desktop (as shown in the image at the top)... Make sure you have labwc installed, then run ./start_cosmoe_desktop.sh

PROBLEMS

Cosmoe is a work in progress. If Cosmoe fails to compile for you, or an app crashes or displays incorrect behavior, please file an issue at gitlab.

Please see the TODO file for a list of issues and possible workarounds.

API DOCUMENTATION

Since Cosmoe strives to conform to the Be API, the best API documentation to use is the BeBook, available at several sites online.

https://www.haiku-os.org/legacy-docs/bebook

Acknowledgements

Thank you to the Haiku team for their work over the years that helped make this possible. Cosmoe apps compile and run on Haiku too!

Showcase app on Haiku