Skip to content

Migrate native adapters to winit 0.31 and asynchronous Wayland transfers - #8767

Closed
mockydevs wants to merge 2 commits into
emilk:mainfrom
mockydevs:feat/winit-031-review
Closed

mockydevs wants to merge 2 commits into
emilk:mainfrom
mockydevs:feat/winit-031-review

Conversation

@mockydevs

@mockydevs mockydevs commented Oct 22, 2026 •

Copy link
Copy Markdown

Migrates egui-winit, both renderer integrations, eframe and the external-event-loop examples to winit 0.31. Native Wayland drops and text paste complete asynchronously with cancellation/stale-response handling, bounded transfers, and an optional off-by-default portal feature. IME restoration and shutdown ownership are adapted to the new lifecycle.

Independent implementation from current main, announced in #7731 (comment). Draft for design review, not ready to merge/release; human review is required before undrafting.

Dependencies / merge blockers

Dependency Coordination
Bounded transfer / portal API rust-windowing/winit#4790; prototype API is not accepted upstream
MIME parsing rust-windowing/winit#4788
Dropped-offer lifetime Smithay/client-toolkit#546
Window error adaptation rust-windowing/glutin#1767 (draft)
Accessibility callbacks AccessKit/accesskit#654; pinned prototype only, respecting its beta contribution policy

All forks have immutable revision pins. Replace them with agreed upstream releases before merging. Linux audit: advisories/licenses OK; source/bans gates reject prototype Git sources and duplicate calloop/SCTK/tiny-skia/x11rb dependencies. No audit exceptions were added. Portal builds need target libdbus headers; the Linux workflow installs them. The adapter does not grant sandbox filesystem access.

Actual validation

  • Passed on Linux/Rust 1.95: spelling/source lint/fmt; public/private all-feature docs; strict all-target/all-feature Clippy in debug and release; WASM Clippy and compilation; minimal/all-feature crate checks and all Glow/WGPU × X11/Wayland combinations; the five eframe doctests after correcting the external-loop example.
  • Also passed: all-feature eframe cross-check for Windows GNU (compilation only; no Windows runtime claim).
  • Full all-target/all-feature tests completed with five image-snapshot target failures (demo app/library, kittest, regression/widget suites). Reference snapshots are unchanged; Unchanged upstream bf5ac0da reproduces the one-pixel test_scroll_to_me mismatch: its rendered PNG is byte-for-byte identical to the candidate (SHA-256 b33112ee…989d1c1). The other four targets were not separately baseline-verified; CI/macOS validation is needed. The contribution guide notes macOS snapshot baselines.
  • JavaScript binding generation passed with the required wasm-bindgen 0.2.126. The platform audit also rejects prototype Git sources on its first macOS target (advisories/licenses/bans OK); its remaining targets stop there.

The separate protocol evidence branch, based on this migration's runtime code, passed its isolated Wayland-server suite: valid/overlapping offers, clipboard, cancellation, unsupported actions, remote/NUL/empty/oversized data, stalls and hover cleanup. Run instructions are included; no private artwork is distributed.

A contributor physically confirmed an Ubuntu Desktop JPEG drop onto a matching square artboard in the integrated downstream 0.36 app after explicitly granting its Flatpak read-only Desktop access. Installed-binary placement/Undo/Redo, same-window opening and one embedded-vector save-back round trip were also checked. These are downstream integrated-build results, not physical tests of this current-main branch.

Other compositors and macOS/mobile/accessibility runtime remain unverified. Private-bus Flatpak testing disturbed the live document portal, was recovered and disabled; repeat portal integration in a separate OS session, never alongside the user's apps. An ordinary URI source still needs an authorized folder grant or portal capability.

  • I have followed the instructions in the PR template.

@github-actions

Copy link
Copy Markdown

Preview is being built...

Preview will be available at https://egui-pr-preview.github.io/pr/8767-feat/winit-031-review

View snapshot changes at kitdiff

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