Upgrading winit 0.29 to 0.30
Breaking0.29.15 → 0.30.13Breaking18Platform1Deprecated4New37Changed16Fixed60
BreakingUpgrade verdict
18 breaking changes and a platform requirement change.
In plain terms
- iOS apps now own the application delegate instead of winit installing its own.
- iOS apps must now handle URL opening results themselves instead of winit pretending they succeeded.
- Renames `TouchpadMagnify` to `PinchGesture`.
- Renames `SmartMagnify` to `DoubleTapGesture`.
Must act Top 5 of 23 that need code or config changes
Rust requirement changed in 0.30.0: 1.65.0 → 1.70.0.
What you must change
Breaking18
On iOS, removes custom application delegates so you can override the application delegate yourself.
On iOS, no longer assumes all URLs opened successfully; override application:didFinishLaunchingWithOptions: to handle them.
application:didFinishLaunchingWithOptions:Renames
TouchpadMagnify to PinchGesture.TouchpadMagnifyPinchGestureRenames
SmartMagnify to DoubleTapGesture.SmartMagnifyDoubleTapGestureRenames
TouchpadRotate to RotationGesture.TouchpadRotateRotationGestureRenames
EventLoopWindowTarget to ActiveEventLoop.EventLoopWindowTargetActiveEventLoopRenames
platform::x11::XWindowType to platform::x11::WindowType.platform::x11::XWindowTypeplatform::x11::WindowTypeRenames
VideoMode to VideoModeHandle to reflect that it does not hold static data.VideoModeVideoModeHandleRemoves Window::new; windows must now be created via ActiveEventLoop::create_window inside the running event loop.
Window::newActiveEventLoop::create_windowEventLoop::create_windowRemoves the Deref implementation for EventLoop that gave EventLoopWindowTarget.
EventLoopEventLoopWindowTargetDerefRemoves WindowBuilder in favor of WindowAttributes.
WindowBuilderWindowAttributesRemoves the generic parameter T from ActiveEventLoop.
ActiveEventLoopRemoves EventLoopBuilder::with_user_event; use EventLoop::with_user_event instead.
EventLoopBuilder::with_user_eventEventLoop::with_user_eventRemoves the redundant EventLoopError::AlreadyRunning variant.
EventLoopError::AlreadyRunningRemoves WindowAttributes::fullscreen and exposes fullscreen as a field directly.
WindowAttributes::fullscreenOn X11, removes the platform::x11::XNotSupported export.
platform::x11::XNotSupportedBumps
sctk-adwaita to 0.9.0 on Wayland, which changes system library crates and is a cascading breaking change.sctk-adwaitaEventLoop::with_user_event now returns EventLoopBuilder.EventLoop::with_user_eventEventLoopBuilderPlatform1
Bumps the minimum supported Rust version (MSRV) from 1.65 to 1.70.
Deprecations to plan for
Deprecated4
Deprecates
EventLoop::run in favor of EventLoop::run_app.EventLoop::runEventLoop::run_appDeprecates
EventLoopExtRunOnDemand::run_on_demand in favor of EventLoop::run_app_on_demand.EventLoopExtRunOnDemand::run_on_demandEventLoop::run_app_on_demandDeprecates EventLoopExtPumpEvents::pump_events in favor of EventLoopExtPumpEvents::pump_app_events.
EventLoopExtPumpEvents::pump_eventsEventLoopExtPumpEvents::pump_app_eventsApplicationHandler<T>Deprecates Window::set_cursor_icon in favor of Window::set_cursor.
Window::set_cursor_iconWindow::set_cursor