#wayland-compositor #wayland #compositor #wayland-client #server-side #client-server #api-bindings

wayland-server

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

131 releases

0.31.6 Oct 23, 2024
0.31.4 Jul 16, 2024
0.31.1 Jan 29, 2024
0.31.0 Sep 2, 2023
0.7.6 Nov 12, 2016

#905 in GUI

Download history 3808/week @ 2024-08-19 3429/week @ 2024-08-26 3856/week @ 2024-09-02 3728/week @ 2024-09-09 3231/week @ 2024-09-16 4140/week @ 2024-09-23 3194/week @ 2024-09-30 2811/week @ 2024-10-07 2466/week @ 2024-10-14 2217/week @ 2024-10-21 3087/week @ 2024-10-28 2356/week @ 2024-11-04 2031/week @ 2024-11-11 1999/week @ 2024-11-18 1827/week @ 2024-11-25 2111/week @ 2024-12-02

8,247 downloads per month
Used in 13 crates (12 directly)

MIT license

435KB
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–11MB
~144K SLoC