Skip to content

Modified Smithay backend for Native macOS/Windows Wayland support (Research Artifact)

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

J-x-Z/smithay-universal

🌐 Smithay Universal (Fork)

Research Artifact: This is a modified fork of Smithay designed for cross-platform Wayland research. It enables native Wayland compositors on macOS and Windows without Linux kernel dependency, VMs, or X11 translation.

🚀 Key Improvements & Modifications

1. Universal Winit Backend

We have significantly overhauled the backend::winit module to serve as a production-grade backend rather than just a debug tool.

  • MacOS (Cocoa/CGL): Implemented native CGL context management, IOSurface mapping, and Retina scaling support.
  • Windows (WGL/EGL): (In Progress) Implementation of WGL context creation via glutin.
  • Latency Optimization: Custom rendering loop integration to bypass strict OS windowing limitations.

2. Event Loop Fusion

  • CFRunLoop Integration: Implements a Calloop Event Source that hooks directly into macOS CFRunLoop, allowing Wayland clients to be dispatched purely within the native macOS application loop.
  • Input Bridging: Low-latency translation of Winit events to Wayland input events (keyboard, mouse, touchpad gestures).

3. Experimental: "Turbo-Charged" SIMD Acceleration

  • Zero-Cost Mapping: Implements the "Zero-Cost Protocol Virtualization" architecture described in our IEEE TC paper draft.
  • NEON/AVX2 Swizzling: Includes a hand-tuned SIMD module for wl_shm format conversion, bridging the performance gap on non-Linux platforms lacking dmabuf.
  • Validation: Pass swizzle_correctness check via cargo test (or standalone turbo_test.rs).
  • 📄 Paper: Full manuscript and benchmarks at ../paper/

4. Build System

  • Decoupled gbm and libinput dependencies to allow compilation on non-Linux targets.
  • Added macOS-specific feature flags and linking arguments.

Smithay (Original README)

Smithay

Crates.io docs.rs Build Status Join the chat on matrix at #smithay:matrix.org Join the chat via bridge on #smithay on libera.chat

A smithy for rusty wayland compositors

Goals

Smithay aims to provide building blocks to create wayland compositors in Rust. While not being a full-blown compositor, it'll provide objects and interfaces implementing common functionalities that pretty much any compositor will need, in a generic fashion.

It supports the core Wayland protocols, the official protocol extensions, and some external extensions, such as those made by and for wlroots and KDE

Also:

  • Documented: Smithay strives to maintain a clear and detailed documentation of its API and its functionalities. Compiled documentations are available on docs.rs for released versions, and here for the master branch.
  • Safety: Smithay will target to be safe to use, because Rust.
  • Modularity: Smithay is not a framework, and will not be constraining. If there is a part you don't want to use, you should not be forced to use it.
  • High-level: You should be able to not have to worry about gory low-level stuff (but Smithay won't stop you if you really want to dive into it).

Anvil

Smithay as a compositor library has its own sample compositor: anvil.

To get informations about it and how you can run it visit anvil README

Other compositors that use Smithay

  • Cosmic: Next generation Cosmic desktop environment
  • Catacomb: A Wayland Mobile Compositor
  • MagmaWM: A versatile and customizable Wayland Compositor
  • Niri: A scrollable-tiling Wayland compositor
  • Strata: A cutting-edge, robust and sleek Wayland compositor
  • Pinnacle: A WIP Wayland compositor, inspired by AwesomeWM
  • Sudbury: Compositor designed for ChromeOS
  • wprs: Like xpra, but for Wayland, and written in Rust.
  • Local Desktop: An Android app for running GUI Linux via PRoot and Wayland.

System Dependencies

(This list can depend on features you enable)

  • libwayland
  • libxkbcommon
  • libudev
  • libinput
  • libgbm
  • libseat
  • xwayland

Contact us

If you have questions or want to discuss the project with us, our main chatroom is on Matrix: #smithay:matrix.org.

License

This project (Smithay-Universal) is licensed under the GNU General Public License v3.0.

The original Smithay library remains under the MIT license. Modifications in this fork are licensed under GPLv3.

Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

See the LICENSE file for details.

About

Modified Smithay backend for Native macOS/Windows Wayland support (Research Artifact)

Topics

Resources

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
LICENSE.txt

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages