mcpp index

freedesktop.wayland-server

import

libwayland-server — the compositor side of the Wayland protocol, with a C++23 module wrapper

import freedesktop.wayland.server;
#include <wayland-server-core.h>

Module name read from the upstream `export module` declaration in src/wayland-server.cppm.

mcpp add freedesktop.wayland-server@1.26.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// The module wrappers, used the way a consumer would.
//
// The claim they make is narrow and testable: `import freedesktop.wayland.client;` gives
// you the same entities `#include <wayland-client.h>` does, spelled the same
// way. So this file includes NOTHING from wayland — no header — and still
// calls the stock API. If an export were missing, this would not compile; if a
// name had been renamed or wrapped, it would not compile either.
//
// tests/wayland.cpp is the header-based sibling. Both must pass: the module
// layer is an addition, not a replacement.

#ifdef __linux__

#include <cstdio>
#include <string>
#include <vector>

import freedesktop.wayland.client;
import freedesktop.wayland.server;
import freedesktop.wayland.util;

namespace {
// …

tests/examples/wayland/tests/modules.cpp · project tests/examples/wayland

Build · upstream manifest

modules
freedesktop.wayland.server
targets
wayland-server (shared)
language
c++23
manifest version
1.26.0
dependencies
compat
source
https://raw.githubusercontent.com/mcpplibs/wayland/v1.26.0/mcpp/server/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
1.26.0 latest Linux GLOBAL CN 9bce2cc00c61…