#wayland #client #server #protocol #extension

wayland-protocols

Generated API for the officials wayland protocol extensions

72 releases

✓ Uses Rust 2018 edition

0.24.0 Sep 14, 2019
0.23.5 Jun 13, 2019
0.23.1 Mar 24, 2019
0.21.7 Nov 28, 2018
0.7.6 Nov 12, 2016

#8 in GUI

Download history 7578/week @ 2019-07-03 6976/week @ 2019-07-10 6448/week @ 2019-07-17 6635/week @ 2019-07-24 6751/week @ 2019-07-31 6734/week @ 2019-08-07 6542/week @ 2019-08-14 7133/week @ 2019-08-21 6805/week @ 2019-08-28 7850/week @ 2019-09-04 6721/week @ 2019-09-11 9005/week @ 2019-09-18 8940/week @ 2019-09-25 10369/week @ 2019-10-02 7977/week @ 2019-10-09

30,309 downloads per month
Used in 283 crates (4 directly)

MIT license

245KB
3.5K SLoC

crates.io Build Status codecov

Wayland rust crates

This project contains rust crates for using the wayland protocol, both client side and server side.

There are two ways to use them:

  • By default, they use a pure rust implementation of the protocol
  • If you set the use_system_lib cargo feature, they will rather act as bindings on top of the wayland system C libraries, and this will add methods to access pointers to the C objects in the API. You'll need to use this feature if you need to interact with a C library that requires wayland objects (typically to intialize an OpenGL context)

If you use the use_system_lib feature, the crates thus obviously require that the wayland C libs are installed on your system. You can however require that they are dynamically loaded at startup rather than directly linked by setting the dlopen flag. This can be useful if you want to ship a binary that should gracelly handle the absence of these libs (by fallbacking to X11 for example).

This repository actually hosts 8 crates. The 3 main crates you'll likely want to use:

  • wayland-client and wayland-server are the main crates for client and server side bindings
  • wayland-protocols regroups bindings on the official protocol extentions available

There are also two auxilliary crates:

  • wayland-egl, which is necessary client-side for OpenGL integration
  • wayland-cursor, which helps with loading cursor images from the system temes for use in your apps

And finally 3 internal crates, that you'll need only for integrating a custom protocol extension:

  • wayland-commons contains the protocol logic that can be shared between client-side and server-side
  • wayland-sys is the actual C bindings, on which the crates are built
  • wayland-scanner is the crate used to convert the XML protocol specifications into rust code

Documentation

The documentation for the master branch is available online.

The documentation for the releases can be found on docs.rs:

Requirements

Requires at least rust 1.33 to be used, and version 1.15 of the wayland system libraries if using the use_system_lib cargo feature.

Chat and support

For general quick questions you can get answers in the chat room.

The chat room is bridged over multiple chat servers, here are 3 options on how to connect to the chat:

Dependencies

~1MB
~23K SLoC