Update dependencies: env_logger, cfg_aliases, resvg and most significantly wgpu.
Safe handling of the window/surface lifetime. For now this uses Arc<winit::window::Window> to ensure the window outlives the surface. A true (efficient) solution would be closer to the self-referential struct problem (though without the aliasing and pinning sub-problems); essentially we could "just" cast the lifetime to 'static, however there's no good way to do this without making new_surface unsafe or depend on WGPU (having wgpu::SurfaceTarget in raw-window-handle would help).
It turns out that examples were failing on X11 with a confusing message. https://github.com/rust-windowing/winit/pull/3414 fixes the message; this PR adds X11 to the default feature selection.
Update dependencies:
env_logger
,cfg_aliases
,resvg
and most significantlywgpu
.Safe handling of the window/surface lifetime. For now this uses
Arc<winit::window::Window>
to ensure the window outlives the surface. A true (efficient) solution would be closer to the self-referential struct problem (though without the aliasing and pinning sub-problems); essentially we could "just" cast the lifetime to'static
, however there's no good way to do this without makingnew_surface
unsafe or depend on WGPU (havingwgpu::SurfaceTarget
inraw-window-handle
would help).