Expand description
§Wayland Headers for Rust
This library contains minimalist Rust FFI bindings for Wayland in a way that’s roughly equivalent to the official Wayland 1.18.0 headers for C/C++ along with the stable protocols found in wayland-protocols 1.20. It makes no attempt at providing safe or idiomatic Rust wrappers and doesn’t rename any C identifiers to match Rust’s style guidelines.
For example, the following Rust code:
use wayland_headers::wayland_client::*;is roughly equivalent to the following C code:
#include <wayland-client.h>This library is based specifically on Wayland 1.18.0 and protocols 1.20 since those are the versions provided by Steam Runtime 3 ‘sniper’.
Using this library does not automatically link against any libwayland-*.so libraries.
§Extension Protocol wl_interface Statics
For the extension protocol wl_interface statics (e.g. xdg_shell_client_protocol::xdg_popup_interface), only external declarations are provided. See wayland-protocol-statics for a convenient way to include their definitions in a Rust program.
Modules§
- presentation_
time_ client_ protocol - presentation_
time_ server_ protocol - viewporter_
client_ protocol - viewporter_
server_ protocol - wayland_
client - wayland_
client_ core - wayland_
client_ protocol - wayland_
cursor - wayland_
egl - wayland_
egl_ core - wayland_
server - wayland_
server_ core - wayland_
server_ protocol - wayland_
util - wayland_
version - xdg_
shell_ client_ protocol - xdg_
shell_ server_ protocol
Macros§
- wl_
array_ for_ each - Roughly equivalent to the
wl_array_for_each(pos, array)C macro. - wl_
client_ for_ each - Roughly equivalent to the
wl_client_for_each(client, list)C macro. - wl_
container_ of - Roughly equivalent to the
wl_container_of(ptr, sample, member)C macro. - wl_
list_ for_ each - Roughly equivalent to the
wl_list_for_each(pos, head, member)C macro. - wl_
list_ for_ each_ reverse - Roughly equivalent to the
wl_list_for_each_reverse(pos, head, member)C macro. - wl_
list_ for_ each_ reverse_ safe - Roughly equivalent to the
wl_list_for_each_reverse_safe(pos, tmp, head, member)C macro. - wl_
list_ for_ each_ safe - Roughly equivalent to the
wl_list_for_each_safe(pos, tmp, head, member)C macro. - wl_
resource_ for_ each - Roughly equivalent to the
wl_resource_for_each(resource, list)C macro. - wl_
resource_ for_ each_ safe - Roughly equivalent to the
wl_resource_for_each_safe(resource, tmp, list)C macro.