NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #1255 most downloaded on crates.io
Cross-platform window creation library.
Latest stable
0.30.13
Last release 26 days ago
24 Oct 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 53 of the last 60 stable releases
5 versions withdrawn
withdrawn after publishing
11 years old
121 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
On macOS, fix application termination on ControlFlow::Exit
ControlFlow::ExitReceivedCharacter events when Alt is held.ReceivedCharacter events.run_return.EventLoopClosed to contain the original event.is_synthetic field to WindowEvent variant KeyboardInput,
indicating that the event is generated by winit.CursorMoved event when a Touch event occurs,
as X11 implicitly moves the cursor for such events.Add web support via the 'stdweb' or 'web-sys' features
run_return.set_prefers_home_indicator_hidden.Window::set_cursor_icon.msg_send usage that was UB and/or would break if ! is stabilized.maximized when manually changing the window's position or size.CursorIcon::Grab and CursorIcon::Grabbing.ReceivedCharacter.XWindowTypes.HiDpiFactorChanged event.RedrawRequested event after creating a new window.derivative crate dependency.impl Iterator<Item = MonitorHandle> instead of AvailableMonitorsIter consistently.Window::fullscreen returning the old state in Resized events instead of
reflecting the new fullscreen stateEventLoop::new and EventLoop::with_user_event from getting called outside the main thread.
EventLoop outside the main thread.Your coding agent can read these notes before it upgrades. Set up the MCP server →
On macOS, drop the run closure on exit.
WindowEvent::Touch are window client coordinates instead of screen coordinates.WindowBuilderExt::with_disallow_hidpi to have the option to turn off best resolution openGL surface.new_user_event method to with_user_event.Window::set_fullscreen now takes Option<Fullscreen> where Fullscreen
consists of Fullscreen::Exclusive(VideoMode) and
Fullscreen::Borderless(MonitorHandle) variants.
T: Clone requirement from the Clone impl of EventLoopProxy<T>.is_wayland, is_x11, xlib_xconnection and wayland_display have been moved to a new EventLoopWindowTargetExtUnix trait.set_prefers_status_bar_hidden extension function instead of
hijacking set_decorations for this purpose.EventLoopProxy.raw_window_handle::HasRawWindowHandle for Window type on all supported platforms.-[NSView drawRect:].ControlFlow::Poll. It wasn't polling if that was the only mode ever used by the application.0.0 - now it gives a reasonable number.On X11, non-resizable windows now have maximize explicitly disabled.
WindowEvent::DroppedFile
and WindowEvent::HoveredFile.DeviceEvent::Button.Event::Suspended(true / false) to Event::Suspended and Event::Resumed._NET_WM_PING to allow desktop environment to kill unresponsive programs.request_redraw during EventsCleared sending multiple RedrawRequested events.RedrawRequested could be dispatched before input events in event loop iteration.RedrawRequested but before EventsCleared.with_maximized not properly setting window size to entire window.WindowExtMacOS::request_user_attention() to take an enum instead of a bool.Changes below are considered breaking.
EventsLoop to EventLoop.event, event_loop, monitor, and window modules.os module changes:
platform.desktop module on Windows, Mac, and Linux.EventLoopProxy::wakeup has been removed in favor of send_event.run method drives winit event loop.
! to ensure API behaves identically across all supported platforms.
emscripten implementation to work without lying about the API.ControlFlow's variants have been replaced with Wait, WaitUntil(Instant), Poll, and Exit.
EventsCleared is processed.Wait waits until new events are available.WaitUntil waits until either new events are available or the provided time has been reached.Poll instantly resumes the event loop.Exit aborts the event loop.'static + FnMut(Event<T>, &EventLoop<T>, &mut ControlFlow).
&EventLoop<T> is provided to allow new Windows to be created.platform::desktop module exposes EventLoopExtDesktop trait with run_return method.
run, but returns control flow to the calling context and can take non-'static closures.EventLoop's poll_events and run_forever methods have been removed in favor of run and run_return.Event::Awakened in favor of Event::UserEvent(T).
EventLoopProxy::send_event.WindowEvent::Refresh to WindowEvent::RedrawRequested.
RedrawRequested can be sent by the user with the Window::request_redraw method.EventLoop, EventLoopProxy, and Event are now generic over T, for use in UserEvent.NewEvents(StartCause), EventsCleared, and LoopDestroyed variants to Event.
NewEvents is emitted when new events are ready to be processed by event loop.
StartCause describes why new events are available, with ResumeTimeReached, Poll, WaitCancelled, and Init (sent once at start of loop).EventsCleared is emitted when all available events have been processed.
LoopDestroyed is emitted when the run or run_return method is about to exit.MonitorId to MonitorHandle.serde implementations from ControlFlow.WindowBuilder::multitouch field, since it was only implemented on a few platforms. Multitouch is always enabled now.ns identifiers to use snake_case for consistency with iOS's ui identifiers.MonitorHandle::video_modes method for retrieving supported video modes for the given monitor.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
On Wayland, added a get_wayland_display function to EventsLoopExt.
get_wayland_display function to EventsLoopExt.CursorMoved(0, 0) getting dispatched on window focus.Nothing published for this version
Nothing published for this version
Breaking: image crate upgraded to 0.20. This is exposed as part of the icon_loading API.
image crate upgraded to 0.20. This is exposed as part of the icon_loading API.VirtualKeyCode enum).WindowBuilderExt::with_gtk_theme_variant to X11-specific WindowBuilder functions.set_title function.Window::set_cursor now applies immediately instead of requiring specific events to occur first.HoveredFile and HoveredFileCancelled events are now implemented.Window::set_maximized.Debug trait for Window, EventsLoop, EventsLoopProxy and WindowBuilder.Resized event will always be generated after a DPI change to ensure the window's logical size is consistent with the new DPI.serde feature with implementations of Serialize/Deserialize for DPI types and various event types.PartialEq, Eq, and Hash implementations on public types that could have them but were missing them.From<NSApplicationActivationPolicy> impl from ActivationPolicy on macOS.WindowExt::request_user_attention.On macOS, fix so applications receive the event.
<C-Tab> so applications receive the event.<Cmd-{key}> so applications receive the event.On X11, prevent a compilation failure in release mode for versions of Rust greater than or equal to 1.30.
Cocoa and core-graphics updates.
Window functions on Windows.UIView is now the default root view. WindowBuilderExt::with_root_view_class can be used to set the root view objective-c class to GLKView (OpenGLES) or MTKView (Metal/MoltenVK).UIApplication is not started until Window::new is called.JmpBuf type used for setjmp/longjmp calls. Previously this was a buffer overflow on most architectures.On Windows, non-resizable windows now have the maximization button disabled. This is consistent with behavior on macOS and popular X11 WMs.
unreachable! usage when guessing the DPI factor with no detected monitors.Added logging through log. Logging will become more extensive over time.
log. Logging will become more extensive over time.c_char is unsigned.Breaking: All deprecated methods have been removed. For Window::platform_display and Window::platform_window, switch to the appropriate platform-speci…
WindowBuilderExt::with_no_redirection_bitmap.VirtualKeyCode::LMenu and VirtualKeyCode::RMenu; Windows now generates VirtualKeyCode::LAlt and VirtualKeyCode::RAlt instead.Window::hidpi_factor has been renamed to Window::get_hidpi_factor for better consistency. WindowEvent::HiDPIFactorChanged has been renamed to WindowEvent::HiDpiFactorChanged. DPI factors are always represented as f64 instead of f32 now.WindowEvent::HiDpiFactorChanged is implemented, and MonitorId::get_hidpi_factor and Window::hidpi_factor return accurate values.WindowEvent::HiDpiFactorChanged on X11.Window::set_cursor_position is now relative to the client area.MonitorId::get_dimensions has been implemented and both MonitorId::get_hidpi_factor and Window::get_hidpi_factor return accurate values.MonitorId::get_hidpi_factor now returns the same value as Window::get_hidpi_factor (it previously would always return 1.0).LogicalPosition and LogicalSize, respectively. The notable exception is MonitorId methods, which deal in PhysicalPosition and PhysicalSize. See the documentation for specifics and explanations of the types. Additionally, winit automatically conserves logical size when the DPI factor changes.Window::platform_display and Window::platform_window, switch to the appropriate platform-specific WindowExt methods. For Window::get_inner_size_points and Window::get_inner_size_pixels, use the LogicalSize returned by Window::get_inner_size and convert as needed.EventsLoop::get_available_monitors and EventsLoop::get_primary_monitor now have identical counterparts on Window, so this information can be acquired without an EventsLoop borrow.AvailableMonitorsIter now implements Debug.XConnection.Window::set_cursor_state and CursorState enum removed in favor of the more composable Window::grab_cursor and Window::hide_cursor. As a result, grabbing the cursor no longer automatically hides it; you must call both methods to retain the old behavior on Windows and macOS. Cursor::NoneCursor has been removed, as it's no longer useful.Window::set_cursor_position now returns Result<(), String>, thus allowing for Box<Error> conversion via ?.On X11, the Moved event is no longer sent when the window is resized without changing position.
Moved event is no longer sent when the window is resized without changing position.MouseCursor and CursorState now implement Default.WindowBuilder::with_resizable implemented for Windows, X11, Wayland, and macOS.Window::set_resizable implemented for Windows, X11, Wayland, and macOS.WINIT_HIDPI_FACTOR has been added for overriding DPI factor.with_override_redirect now actually enables override redirect.VirtualKeyCode::LAlt and VirtualKeyCode::RAlt instead of None for both.VirtualKeyCode::RWin and VirtualKeyCode::LWin are no longer switched.EventsLoop on X11, most commonly manifesting as "[xcb] Unknown sequence number while processing queue".CursorMoved and MouseInput events are only generated if they occurs within the window's client area.MouseInput event.Icon::to_cardinals is no longer public, since it was never supposed to be.
Icon::to_cardinals is no longer public, since it was never supposed to be.Window::get_current_monitor now reliably returns the correct monitor.Window::hidpi_factor returns values from XRandR rather than the inaccurate values previously queried from the core protocol.MonitorId now implements Debug.with_decorations(false) would cause set_decorations(true) to produce a transparent titlebar with no title.MonitorId::get_position on macOS.Window::get_current_monitor now returns accurate values.WindowBuilderExt::with_resize_increments to macOS.WindowBuilderExt::with_resize_increments and WindowBuilderExt::with_base_size now take u32 values rather than i32.Window::set_ime_spot(x: i32, y: i32) method, which is implemented on X11 and macOS.os::unix::WindowExt::send_xim_spot(x: i16, y: i16) no longer exists. Switch to the new Window::set_ime_spot(x: i32, y: i32), which has equivalent functionality.Pause and Scroll keys on Windows.CursorState::Hide when the cursor is grabbed now ungrabs the cursor first.MouseCursor::NoneCursor on Windows.WindowBuilder::with_always_on_top and Window::set_always_on_top. Implemented on Windows, macOS, and X11.WindowBuilderExt now has with_class, with_override_redirect, and with_x11_window_type to allow for more control over window creation. WindowExt additionally has set_urgent._NET_WM_PID and WM_CLIENT_MACHINE. Note that prior to this, the WM_CLASS hint was automatically set to whatever value was passed to with_title. It's now set to the executable name to better conform to expectations and the specification; if this is undesirable, you must explicitly use WindowBuilderExt::with_class.Created the Copy, Paste and Cut VirtualKeyCodes and added support for them on X11 and Wayland
Copy, Paste and Cut VirtualKeyCodes and added support for them on X11 and Wayland.with_decorations(false) in macOSNSWindow and supporting objects might be alive long after they were closed which resulted in apps consuming more heap then needed. Mainly it was affecting multi window applications. Not expecting any user visible change of behaviour after the fix.NSFullSizeContentViewWindowMask was not being correctly applied to .fullsize_content_view.get_position on Windows to be relative to the screen rather than to the taskbar.Moved event on Windows to use position values equivalent to those returned by get_position. It previously supplied client area positions instead of window positions, and would additionally interpret negative values as being very large (around u16::MAX).Moved event on macOS.Moved event correctly use window positions rather than client area positions. Additionally, a stray Moved that unconditionally accompanied Resized with the client area position relative to the parent has been eliminated; Moved is still received alongside Resized, but now only once and always correctly.DeviceEvent other than Text. Mouse DeviceEvents are now received even if the window isn't in the foreground.DeviceId on Windows is no longer a unit struct, and now contains a u32. For WindowEvents, this will always be 0, but on DeviceEvents it will be the handle to that device. DeviceIdExt::get_persistent_identifier can be used to acquire a unique identifier for that device that persists across replugs/reboots/etc.run_forever on X11 to stop discarding Awakened events.WindowBuilderExt::with_resize_increments and WindowBuilderExt::with_base_size to X11, allowing for more optional hints to be set.WindowBuilder::with_window_icon and Window::set_window_icon, finally making it possible to set the window icon on Windows and X11. The icon_loading feature can be enabled to allow for icons to be easily loaded; see example program window_icon.rs for usage.WindowBuilderExt::with_taskbar_icon and WindowExt::set_taskbar_icon.set_fullscreen(None) on a window that has not been fullscreened prior.Nothing published for this version
Implement WindowBuilder::with_maximized, Window::set_fullscreen, Window::set_maximized and Window::set_decorations for MacOS.
WindowBuilder::with_maximized, Window::set_fullscreen, Window::set_maximized and Window::set_decorations for MacOS.WindowBuilder::with_maximized, Window::set_fullscreen, Window::set_maximized and Window::set_decorations for Windows.WindowBuilder::with_fullscreen no longer changing monitor display resolution.get_position and set_position are more universally accurate across different window managers, and get_outer_size actually works now.! (never) type.WindowEvent::HiDPIFactorChanged for macOSsetlocale. Additionally, when input methods are started, stopped, or restarted on the server end, it's correctly handled.Refresh event on Windows.MouseCursor variants to cursor icons on Windows.get_position on macOS to return outer frame position, not content area position.set_position on macOS to set outer frame position, not content area position.get_inner_position method to Window, which gets the position of the window's client area. This is implemented on all applicable platforms (all desktop platforms other than Wayland, where this isn't possible).Closed event has been replaced by CloseRequested and Destroyed. To migrate, you typically just need to replace all usages of Closed with CloseRequested; see example programs for more info. The exception is iOS, where Closed must be replaced by Destroyed.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.