Registry / other / winit
library0.30.13rscratesunverified

Cross-platform window creation and event loop library for Rust.

# Cargo.toml [dependencies] winit = "0.30.13"
INSTALL
IMPORT
SIG · WINIT
W
winit
otherrustv0.30.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EventLoop
use winit::event_loop::EventLoop;

Creates an event loop and runs it.

use winit::event_loop::EventLoop; fn main() { let event_loop = EventLoop::new().unwrap(); event_loop.run(|_event, _target| { // handle events }).unwrap(); }
Debug
Known issues
gotchaRequires platform-specific features for certain functionality (e.g., X11 on Linux).
fix
Enable the appropriate feature flags (e.g., `x11`, `wayland`) in Cargo.toml.
affects: >=0.30.0
Upgrade
Version history
0.30.13latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
winit — cargo add winit · libregistry