Skip to content

Generating empty Dispatch and GlobalDispatch implementations for each interface in wayland-rs#4668

Open
mattkae wants to merge 3 commits intomainfrom
feature/wayland-protocol-dispatcher-generation
Open

Generating empty Dispatch and GlobalDispatch implementations for each interface in wayland-rs#4668
mattkae wants to merge 3 commits intomainfrom
feature/wayland-protocol-dispatcher-generation

Conversation

@mattkae
Copy link
Contributor

@mattkae mattkae commented Feb 5, 2026

What's new?

  • Implemented write_dispatch_rs which writes the Dispatch and GlobalDispatch implementations for each Wayland interface to src/dispatch.rs
  • The generated code contains no-ops for each incoming request as well as a generic data binding function
  • Updated the protocol parser to check whether or not an interface is global so that we can properly generate the GlobalDispatch implementation
  • Simplified how metadata is handled for the WaylandProtocol objects by removing the tuple

How to test

  1. Run cargo build
  2. See that src/dispatch.rs gets generated with a bunch of no-op implementations
image

Checklist

  • Tests added and pass
  • Adequate documentation added
  • (optional) Added Screenshots or videos

@mattkae mattkae requested review from RAOF and robert-ancell February 5, 2026 21:34
@mattkae mattkae requested a review from a team as a code owner February 5, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant