#wayland #wayland-compositor #compositor #server-side #api-bindings #server-framework #extension

wayland-server

Bindings to the standard C implementation of the wayland protocol, server side

126 releases

0.31.1 Jan 29, 2024
0.31.0 Sep 2, 2023
0.30.1 May 30, 2023
0.30.0 Dec 27, 2022
0.7.6 Nov 12, 2016

#411 in GUI

Download history 1544/week @ 2023-11-27 1316/week @ 2023-12-04 1447/week @ 2023-12-11 1476/week @ 2023-12-18 1001/week @ 2023-12-25 1081/week @ 2024-01-01 1321/week @ 2024-01-08 1451/week @ 2024-01-15 1736/week @ 2024-01-22 2438/week @ 2024-01-29 2320/week @ 2024-02-05 2809/week @ 2024-02-12 3456/week @ 2024-02-19 3009/week @ 2024-02-26 2637/week @ 2024-03-04 1071/week @ 2024-03-11

10,580 downloads per month
Used in 13 crates (12 directly)

MIT license

430KB
9K SLoC

crates.io docs.rs Continuous Integration codecov

wayland-server

Server side API for the Wayland protocol. This crate provides infrastructure for manipulating Wayland objects, as well as object definitions for the core Wayland protocol. Protocol extensions can be supported as well by combining this crate with wayland-protocols, which provides object definitions for a large set of extensions.

Note: This crate is a low-level interface to the Wayland protocol. If you are looking for a more battery-included toolkit for writing a Wayland server, you may consider Smithay, which is a Wayland server framework built on top of it.

The crate has different backends to Wayland protocol serialization:

  • By default, it uses a pure-rust implementation of the protocol, and contains little unsafe code.
  • Activating the use_system_lib makes it instead bind to the system libwayland-server.so. This allows you to access C pointer versions of the wayland objects, which is necessary for interfacing with other non-Rust Wayland-related libraries (such as for OpenGL support, see the wayland-egl crate).
  • Activating the dlopen implies use_system_lib, but additionaly the crate will not explicitly link to libwayland-server.so and instead try to open it at runtime, and return an error if it cannot find it. This allows you to build apps that can gracefully run in non-Wayland environment without needing compile-time switches.

Dependencies

~3–13MB
~144K SLoC