Skip to content

Upgrade winit in unity-native-plugin-tester #21

Description

@aosoft

Background

unity-native-plugin-tester currently depends on winit 0.23.0 and raw-window-handle 0.3.3. winit 0.23.0 no longer compiles on macOS because the bundled cocoa version has a BOOL (i8bool) ABI mismatch.

As a workaround in #19, the Windows-only deps (winit, winapi, wio, raw-window-handle) and the window / d3d11 modules have been gated to cfg(windows). The tester therefore builds and runs only on Windows.

Proposal

Upgrade winit (e.g., to 0.30.x) so that the tester can potentially be used on macOS / Linux in the future.

Required changes

  • unity-native-plugin-tester/src/window.rs
    • EventLoop::run_returnApplicationHandler trait–based event handling (or pump_app_events)
    • WindowBuilder::new()Window::default_attributes() + EventLoop::create_window()
    • EventLoop::<u32>::new_any_thread() API change
  • unity-native-plugin-tester/src/d3d11.rs
    • raw-window-handle 0.3 → 0.6: HasRawWindowHandleHasWindowHandle, return type changes
  • unity-native-plugin-tester/Cargo.toml
    • Bump winit and raw-window-handle

Out of scope

  • Adding a Metal / Vulkan tester for macOS / Linux (separate task; only relevant once winit is current).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions