Repository navigation
Add Windows desktop support and native host integration - #1
Open
wintergraham wants to merge 2 commits into
Open
wintergraham wants to merge 2 commits into
wintergraham wants to merge 2 commits into
Conversation
wintergraham
marked this pull request as ready for review
October 3, 2026 09:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows currently lacks native dialog and activation implementations in the desktop host. This adds Windows desktop support using the existing winit, wgpu, arboard, AccessKit and rfd backends, plus the native host access needed to embed child views.
FileDialogs::native_window()andWindowContext::native_window().Application::run_with_pump()for foreign native message loops. On Windows it runs through winit's message hook outside application callbacks, avoiding nested-pump paint starvation. macOS uses a guarded default-mode timer.This PR contains the two Windows/native-host commits only. The later Ask scrolling/accessibility optimizations and bounds-observation changes are excluded.
Validation
Passed locally on Windows/MSVC:
cargo fmt --all -- --checkcargo test -p zgui -p zgui-desktop --lib --lockedcargo test -p zgui-desktop --lib host_suspend_recreates_native_resources_and_retains_editor_state --locked -- --ignored --test-threads=1cargo run -p zgui-desktop --example native_message_pump --locked(58 pump calls and orderly exit)cargo clippy --workspace --all-targets --locked(completed with warnings)cargo test --workspace --doc --locked(32 doctests passed)Also passed:
cargo check --workspace --lib --target aarch64-apple-darwin --lockedfrom the Windows host. This is a cross-compilation check, not macOS runtime validation.Strict
cargo clippy --workspace --all-targets --locked -- -D warningsis blocked on Rust 1.98 by existing upstream warnings in unchanged benchmark/GPU/example code:manual_is_multiple_of,chunks_exact_to_as_chunksandfor_unbounded_range. These files have no diff in this PR.Windows dialog interaction, screen readers, cross-process clipboard, DPI transitions, and macOS runtime behavior still require separate native qualification.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.