github.com/swaywm/wlroots

A modular Wayland compositor library

Open this visualization on its own page →

Contributors

186

Lines of Code

12,831

From

2017-04-25

To

2021-11-01

About swaywm/wlroots

wlroots is a modular Wayland compositor library written in C that provides reusable components for building custom Wayland compositors. It abstracts the complexity of display and input hardware through pluggable backends supporting KMS/DRM, libinput, Wayland, X11, and headless modes, all of which can be created, destroyed, or mixed at runtime. The library implements a comprehensive set of Wayland protocol interfaces and extensions in an unopinionated manner, allowing developers to use only the pieces they need.

The project includes high-level tools for common compositor tasks like output arrangement, renderer abstractions for simplified graphics handling, and robust Xwayland support without requiring developers to implement their own X11 window manager. By handling approximately 60,000 lines of foundational code, wlroots lets compositor developers focus on unique features while still gaining high performance, broad hardware compatibility, and excellent protocol support.

wlroots is developed under the direction of the Sway project and offers wrapper libraries for multiple programming languages. It's built with Meson and has optional support for advanced rendering through GLES2 and Vulkan backends, along with optional X11 support. The project maintains an active community through IRC and documentation, making it a substantial foundation for anyone building Wayland-based desktop environments or window managers.

Share this video