talira

Cross-platform window creation and event handling for Rust

open sourceApache-2.0free

winit is a Rust library that creates and manages windows and delivers their events (resizing, key presses, mouse movement) across platforms: Windows, macOS, Linux on X11 and Wayland, Android, iOS, the web and Redox's Orbital. It's deliberately a low-level building block: drawing into a window is left to its platform-specific handles or another library, such as a graphics API.

Problems it solves

  • open a window in Rust for a game or renderer
  • handle keyboard and mouse input in a Rust desktop app
  • cross-platform windowing for wgpu

Features

  • window creation and management
  • keyboard, mouse and window events
  • Windows, macOS, X11, Wayland, Android, iOS and web backends
  • raw platform handles for rendering libraries