waylib is a Wayland compositor development library, based on qwlroots, provides a Qt-style development interface. It is designed to be deeply integrated with QtQuick, taking advantage of QtQuick's Scene Graphics model to simplify the complexity of window management. In waylib, it is possible to attach one or multiple Wayland Outputs to a QQuickWindow, and a corresponding Wayland Surface can be attached to a QQuickItem, allowing it to be mixed with QtQuick's graphics components and supporting QRHI for OpenGL and Vulkan compatibility in a single piece of code.
Creating a Wayland compositor using waylib can be simple and efficient, which, on top of wlroots, provides:
Based on the above features, compositor developers need only focus on the business requirements of window management and can develop window compositors as if they were implementing a regular application.
Step 1: Compiling and Installing wlroots and qwlroots
waylib requires the development version (0.17) of wlroots, which needs to be compiled and installed manually. Arch Linux users can install wlroots-git from AUR.
For qwlroots, it is currently recommended to use the version provided as a submodule. However, you can also compile and install it by yourself.
If using the submodule version, please note the following two points:
git clone git@github.com:vioken/waylib.git --recursive
Step 2: Installing other dependencies
Debian
# apt install pkg-config qt6-base-private-dev qt6-base-dev-tools qt6-declarative-private-dev wayland-protocols libpixman-1-dev
Archlinux
# pacman -Syu --noconfirm qt6-base qt6-declarative cmake pkgconfig pixman wayland-protocols ninja
NixOS:
It is recommended to manage dependencies using nix-direnv, or you can use the command nix develop
to enter the build environment.
You can also packaging by using the command "nix build -v -L".
Step 3: Execute the following commands
cmake -B build -DWITH_SUBMODULE_QWLROOTS=ON
cmake --build build
This project assumes that you already have experience with Qt
and wlroots
libraries. In order to better integrate with Qt and wlroots, waylib adheres to Qt's guidelines in terms of interface style, wlroots' modular design philosophy with regards to the underlying design, and Qt's wrapping + layering design for the upper layers that are not directly related to wlroots.
You are free to contribute as much code as you want to this project, provided that you follow the waylib design philosophy and the following types of requirements.
git clone
.git push
.