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 (i8 → bool) 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_return → ApplicationHandler 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: HasRawWindowHandle → HasWindowHandle, 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).
Background
unity-native-plugin-testercurrently depends onwinit 0.23.0andraw-window-handle 0.3.3.winit 0.23.0no longer compiles on macOS because the bundledcocoaversion has aBOOL(i8→bool) ABI mismatch.As a workaround in #19, the Windows-only deps (
winit,winapi,wio,raw-window-handle) and thewindow/d3d11modules have been gated tocfg(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.rsEventLoop::run_return→ApplicationHandlertrait–based event handling (orpump_app_events)WindowBuilder::new()→Window::default_attributes()+EventLoop::create_window()EventLoop::<u32>::new_any_thread()API changeunity-native-plugin-tester/src/d3d11.rsraw-window-handle0.3 → 0.6:HasRawWindowHandle→HasWindowHandle, return type changesunity-native-plugin-tester/Cargo.tomlwinitandraw-window-handleOut of scope