nayland
High-level Nim wrapper around libwayland's client interface
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | 0.3.2 |
|---|---|
| License | BSD-3-Clause |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-04 07:26 |
Tags
Authors
- xTrayambak
Installation
nimble install nayland
choosenim install nayland
git clone https://github.com/nim-windowing/nayland
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| nayland | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 2.2.0 | No |
Source
| Repository | https://github.com/nim-windowing/nayland |
|---|---|
| Homepage | https://github.com/nim-windowing/nayland |
| Registry Source | nimble_official |
README
nayland
Nayland is a library which provides high-level, ergonomic, memory safe* wrappers to the libwayland library's client API.
It aims to make it easier to write Wayland clients in Nim.
notes
This library does not plan to build a high-level windowing abstraction on top of Wayland! It simply provides low-level wrappers over Wayland interfaces. If you're looking for a Wayland-first Nim-native windowing library, your best bet is Surfer.
generating protocol wrappers
Nayland comes with wrapgen, a tool that handles ~95% of the boilerplate generation for pragmatic, high-level, ORC-integrated wrappers for low-level C libwayland types. The output generated by it still needs some tweaking to work, though.
protocols/bindgen.nim is your best friend for this. It can take in a .xml file, and integrate bindings for it inside src/nayland/bindings/protocols/, including private C code.
To generate bindings and wrappers for a protocol, simply put it in the protocols directory, and run:
$ ./protocols/bindgen protocols/foobar.xml
$ ./protocols/wrapgen protocols/foobar.xml
Then tweak the output generated by wrapgen as needed.
Neo (recommended)
Inside your project directory, run:
$ neo add gh:xTrayambak/nayland
Nimble
Inside your project directory, run:
$ nimble add https://github.com/xTrayambak/nayland
roadmap
core protocol
- [X]
wl_display - [X]
wl_registry - [X]
wl_compositor - [X]
wl_surface - [X]
wl_region - [X]
wl_shm - [X]
wl_buffer - [X]
wl_callback - [X]
wl_shm_pool - [X]
wl_data_offer - [X]
wl_data_source - [X]
wl_data_device - [X]
wl_data_device_manager - [X]
wl_seat - [X]
wl_pointer - [X]
wl_keyboard - [X]
wl_touch - [X]
wl_output - [ ]
wl_subcompositor - [X]
wl_region - [ ]
wl_subsurface - [ ]
wl_fixes
XDG shell
- [X]
xdg_wm_base - [X]
xdg_positioner - [X]
xdg_surface - [X]
xdg_toplevel - [X]
xdg_popup
Fractional Scale V1
- [X]
wp_fractional_scale_manager_v1 - [X]
wp_fractional_scale_v1
XDG Decoration V1
- [X]
zxdg_decoration_manager_v1 - [X]
zxdg_toplevel_decoration_v1
System bell V1
- [X]
xdg_system_bell_v1
Idle Inhibit V1
- [X]
zwp_idle_inhibit_manager_v1 - [X]
zwp_idle_inhibitor_v1
Layer Shell V1 (Available in most non-GNOME environments)
- [X]
zwlr_layer_shell_v1 - [X]
zwlr_layer_surface_v1
Cursor Shape V1
- [X]
wp_cursor_shape_manager_v1 - [X]
wp_cursor_shape_device_v1
Tablet V2 (Wacom Tablets)
Note: This isn't tested at runtime like other protocols, as I do not own a Wacom tablet. It's simply verified to be compiling.
- [X]
zwp_tablet_v2 - [X]
zwp_tablet_tool_v2 - [X]
zwp_tablet_seat_v2 - [X]
zwp_tablet_manager_v2 - [X]
zwp_tablet_pad_dial_v2 - [X]
zwp_tablet_pad_group_v2 - [X]
zwp_tablet_pad_ring_v2 - [X]
zwp_tablet_pad_strip_v2 - [X]
zwp_tablet_pad_v2
Presentation Time
- [X]
wp_presentation - [X]
wp_presentation_feedback
Content Type V1
- [X]
wp_content_type_manager_v1 - [X]
wp_content_type_v1
Tearing Control V1
- [X]
wp_tearing_control_manager_v1 - [X]
wp_tearing_control_v1
Linux DMA-BUF V1
- [X]
zwp_linux_dmabuf_v1 - [X]
zwp_linux_buffer_params_v1 - [X]
zwp_linux_dmabuf_feedback_v1
KWin Blur
- [X]
org_kde_kwin_blur_manager - [X]
org_kde_kwin_blur
Pointer Gestures
- [X]
zwp_pointer_gestures_v1 - [X]
zwp_pointer_gesture_swipe_v1 - [X]
zwp_pointer_gesture_pinch_v1 - [X]
zwp_pointer_gesture_hold_v1
Session Lock V1
- [X]
ext_session_lock_manager_v1 - [X]
ext_session_lock_v1 - [X]
ext_session_lock_surface_v1
Idle Notify V1
- [X]
ext_idle_notifier_v1 - [X]
ext_idle_notification_v1
Viewporter
- [X]
wp_viewporter - [X]
wp_viewport