Skip to content

Add Haiku support to the 0.30 Wayland backend - #4762

Draft
duncanmcqueen wants to merge 3 commits into
rust-windowing:v0.30.xfrom
duncanmcqueen:haiku-platform
Draft

duncanmcqueen wants to merge 3 commits into
rust-windowing:v0.30.xfrom
duncanmcqueen:haiku-platform

Conversation

@duncanmcqueen

@duncanmcqueen duncanmcqueen commented Oct 14, 2026 •

Copy link
Copy Markdown

Add the Haiku-specific parts of a working Winit 0.30 Wayland port:

  • Detect the main thread with Haiku's find_thread/getpid APIs.
  • Create notification pipes without pipe2, setting descriptor and status flags separately.
  • Omit EventLoop AsFd/AsRawFd where Haiku's generic poller cannot provide a poller descriptor.
  • Request Haiku's native window border through its legacy KDE server-decoration protocol. Prefer the modern xdg-decoration protocol if the server exposes it. Keep native decoration state separate from client-side frames and honor the decorations flag.

This targets v0.30.x because that is the branch used and tested by the application. The current development branch has reorganized its platform crates. This draft does not claim a completed 0.31 port; please advise whether maintaining the 0.30 implementation is appropriate before a larger rebase.

Validation:

  • Linux: cargo check --lib --no-default-features --features wayland,rwh_06 passed.
  • Haiku hrev60228 x86_64, Rust 1.99: the same check passed with downstream release backports of the related Wayland, calloop and SCTK changes.
  • The application using the initial port displayed the yellow native Haiku tab, accepted physical keyboard input, saved DOCX files and exited through its native close button. Its shutdown workaround is application-specific and is not included in this Winit change.

Related PRs: Smithay/calloop#256 and Smithay/client-toolkit#544; Smithay/wayland-rs#979 provides the Wayland system backend.

Nightly cargo fmt -- --check passes after the formatting follow-up.

CI run 38563095909 also reports failures before compilation: the existing cargo update -p syn --precise 2.0.114 command is ambiguous between syn 2 and 3. Dependency checks report duplicate crates and RUSTSEC-2026-0192 for ttf-parser. This patch changes no manifests, lockfiles, workflow files or cargo-deny rules. The base v0.30.x branch also has failing lockfile and dependency-check jobs (run 31433600950). These failures still need separate CI/dependency maintenance; the Haiku port does not resolve them.

This is draft pending dependency support and maintainer review of the legacy decoration integration. The current Haiku server does not provide the normal modern decoration negotiation path.

AI assistance: Codex helped prepare the code and PR description.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant