Skip to content

Upgrading winit 0.29 to 0.30

Breaking0.29.15 → 0.30.13Breaking18Platform1Deprecated4New37Changed16Fixed60

BreakingUpgrade verdict

18 breaking changes and a platform requirement change.

  • 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`.
Top 5 of 23 that need code or config changes

Rust requirement changed in 0.30.0: 1.65.0 → 1.70.0.

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.
TouchpadMagnifyPinchGesture
Renames SmartMagnify to DoubleTapGesture.
SmartMagnifyDoubleTapGesture
Renames TouchpadRotate to RotationGesture.
TouchpadRotateRotationGesture
Renames EventLoopWindowTarget to ActiveEventLoop.
EventLoopWindowTargetActiveEventLoop
Renames platform::x11::XWindowType to platform::x11::WindowType.
platform::x11::XWindowTypeplatform::x11::WindowType
Renames VideoMode to VideoModeHandle to reflect that it does not hold static data.
VideoModeVideoModeHandle
Removes Window::new; windows must now be created via ActiveEventLoop::create_window inside the running event loop.
Window::newActiveEventLoop::create_windowEventLoop::create_window
Removes the Deref implementation for EventLoop that gave EventLoopWindowTarget.
EventLoopEventLoopWindowTargetDeref
Removes WindowBuilder in favor of WindowAttributes.
WindowBuilderWindowAttributes
Removes the generic parameter T from ActiveEventLoop.
ActiveEventLoop
Removes EventLoopBuilder::with_user_event; use EventLoop::with_user_event instead.
EventLoopBuilder::with_user_eventEventLoop::with_user_event
Removes the redundant EventLoopError::AlreadyRunning variant.
EventLoopError::AlreadyRunning
Removes WindowAttributes::fullscreen and exposes fullscreen as a field directly.
WindowAttributes::fullscreen
On X11, removes the platform::x11::XNotSupported export.
platform::x11::XNotSupported
Bumps sctk-adwaita to 0.9.0 on Wayland, which changes system library crates and is a cascading breaking change.
sctk-adwaita
EventLoop::with_user_event now returns EventLoopBuilder.
EventLoop::with_user_eventEventLoopBuilder
Platform1
Bumps the minimum supported Rust version (MSRV) from 1.65 to 1.70.
Deprecated4
Deprecates EventLoop::run in favor of EventLoop::run_app.
EventLoop::runEventLoop::run_app
Deprecates EventLoopExtRunOnDemand::run_on_demand in favor of EventLoop::run_app_on_demand.
EventLoopExtRunOnDemand::run_on_demandEventLoop::run_app_on_demand
Deprecates 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