Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Getting started

Simon Ser edited this page Sep 7, 2021 · 16 revisions

Integrating wlroots with your build

wlroots ships with a pkg-config entry named wlroots, which should be compatible with most build systems. Compile and install wlroots normally, then link to pkg-config --libs wlroots and add pkg-config --cflags wlroots to your compiler flags (or whatever pretty way of doing this your particular build system encourages).

You also need to link to libwayland and wire up wayland-scanner to scan any protocols you want to use. wlroots provides, for example, and xdg-shell implementation, but it expects you to call wayland-scanner to generate the header before you include wlr/types/wlr_xdg_shell.h. Our naming convention for Wayland protocol headers is to replace any dashes - with underscores _ in the protocol name, then replace .xml with _server.h. You can get these XML files from wayland-protocols (usually you want to reference the path specified by pkg-config --variable=pkgdatadir wayland-protocols rather than copying these into your source tree), and for other protocols from wlr-protocols.

Unstable features

We're still working on stabilizing the interface, and most interfaces are subject to change (though radical change is unlikely at this point). To this end, you need to pass -DWLR_USE_UNSTABLE to your compiler to get anything serious done.

Documentation

wlroots is largely documented through comments in the headers. Read 'em. Also check out tinywl.

Support

We hang out in #sway-devel, an IRC channel on Libera Chat. Come in and ask questions.

Additional resources

You are also encouraged to read the code of other projects using wlroots.