#wayland #server #compositor

wayland-server

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

85 releases

✓ Uses Rust 2018 edition

0.27.0 Jul 3, 2020
0.26.3 Apr 22, 2020
0.25.0 Feb 7, 2020
0.24.1 Dec 13, 2019
0.7.6 Nov 12, 2016

#284 in GUI

Download history 193/week @ 2020-03-16 458/week @ 2020-03-23 30/week @ 2020-03-30 523/week @ 2020-04-06 567/week @ 2020-04-13 171/week @ 2020-04-20 321/week @ 2020-04-27 88/week @ 2020-05-04 583/week @ 2020-05-11 779/week @ 2020-05-18 141/week @ 2020-05-25 395/week @ 2020-06-01 88/week @ 2020-06-08 141/week @ 2020-06-15 93/week @ 2020-06-22 140/week @ 2020-06-29

1,309 downloads per month
Used in 9 crates (8 directly)

MIT license

235KB
5K 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 additionnaly 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

~1.5MB
~25K SLoC