winit gives you a window and nothing to draw in it
Window handling library in pure Rust
At a glance
- What is it?
- winit is a pure Rust window creation and management library that stops at the platform getter: it opens windows and delivers events, then hands rendering to raw-window-handle 0.6, dpi and a second library. Its MSRV story is a moving formula with two documented exceptions.
- Who is it for?
- winit suits a project that wants window creation, event delivery and a raw handle it can pass to a renderer, and that accepts tracking a beta version line such as 0.31.0-beta.4. It does not suit a project wanting text, widgets, a scene graph or a game loop, because none of that is here.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 21, 2026, and from our analysis. They are not legal advice.
Star history
- rust-windowing/winit6,291 ★ · +118
| Repository | 2026-09-23 | 2026-11-21 |
|---|---|---|
| rust-windowing/winit | 6.2k | 6.3k |
118 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The library stops at the platform getter
winit's own framing is that it is a low-level brick in a hierarchy of libraries. It creates windows and lets you handle the events they produce, with the examples given as the window being resized, a key being pressed, and a mouse movement. What it does not do is put anything on that window. To show content you need the platform-specific getters winit provides, or another library on top. That boundary shapes every decision downstream: there is no text drawing, no widget set, no scene graph, and no game loop in this crate, and the project's own pointer for those is external, with Are we GUI Yet? and Are we game yet? named as the places to look when a request falls outside winit's scope. For features that are inside the scope, FEATURES.md is the reference. The repository layout backs the split up: the backend code lives in sibling crates such as winit-x11/, winit-wayland/, winit-win32/, winit-appkit/, winit-uikit/, winit-android/, winit-orbital/ and winit-web/, alongside the shared winit-core/, winit-common/, the dpi/ package and the winit/ facade itself.
The MSRV upper bound is a formula, not a number
Most crates pin a minimum supported Rust version and stop talking. winit adds a ceiling, and it expresses that ceiling as an expression rather than a figure.
min(sid, stable - 3)The floor is stated plainly: the Minimum Supported Rust Version is 1.88, and any change to it comes with a minor version bump. The ceiling is described as a tentative policy. In the formula, `sid` is the current version of rustc provided by Debian Sid and `stable` is the latest stable Rust release, so the bound moves as both of those move. The project states that this bound may be broken in case of a major ecosystem shift or a security vulnerability, which makes the number a policy rather than a guarantee. The same MSRV policy covers every crate in the rust-windowing organization, so the dpi and winit-* crates move together with the facade. Practical consequence for a build: the same toolchain has to satisfy both ends of the range, and a floor of 1.88 means the 2024 edition toolchain is part of the deal, matching the edition set in the workspace manifest.
Android and Redox answer to a different MSRV rule
Two targets are carved out of the policy, and one of the carve-outs is invisible in Cargo. On Android, a higher Rust version must be used for certain Android features, and in that case the MSRV is capped at the latest stable Rust minus three. The project says plainly that this inconsistency is not reflected in Cargo metadata, because Cargo is not capable of expressing that restriction. So a dependency resolver sees one number, and a developer targeting Android has to know a second one exists. Redox is excluded outright: it is not covered by the MSRV policy at all, because it requires a Rust nightly toolchain to compile. That is the only target in the list with a nightly requirement, and it means a workspace that wants Redox cannot stay on stable. The Android exception compounds the beta situation, since the Android backend is one of the crates pinned to the current beta version, so the Android path carries both a moving version string and a different compiler floor.
One workspace, eleven backend crates pinned to one beta string
The manifest is where the architecture becomes visible. The workspace declares `default-members = ["winit"]` and `members = ["dpi", "winit*"]` with `resolver = "3"`, so a bare build touches the facade and the dpi package, and every crate whose name starts with winit is a member. The shared package block sets edition 2024, license Apache-2.0, rust-version 1.88 and version 0.31.0-beta.4, and every backend crate then pins itself to that exact string with an equals sign, for instance winit-wayland, winit-win32, winit-x11, winit-appkit, winit-uikit, winit-android, winit-orbital, winit-web, winit-common and winit-core.
winit-wayland = { version = "=0.31.0-beta.4", path = "winit-wayland", default-features = false }
winit-core = { version = "=0.31.0-beta.4", path = "winit-core" }
winit = { path = "winit" }The exact-match pins are what keep the facade and its backends from drifting apart, and the bare `winit = { path = "winit" }` line carries no version on purpose, so the crate can be used in dev dependencies for documentation. winit-wayland is the one backend declared with `default-features = false`, which means its feature set is not what the workspace assumes. Two details in the tree explain how much of this is automated: taplo.toml and typos.toml configure the toml formatter and the spell checker, and clippy.toml plus deny.toml hold the lint and dependency admission rules.
raw-window-handle 0.6 is the hand-off to whatever draws
Because winit draws nothing, the interesting part of its dependency list is the boundary it hands over. The workspace pulls in rwh_06, which is the raw-window-handle package at version 0.6 with the std feature enabled, and that is the type other libraries use to reach the underlying window handle. Alongside it sit dpi at version 0.1.2 with a local path, so physical size types travel with the crate rather than coming from the registry, and keyboard-types at 0.8.0 for key identification. `tracing` is declared at 0.1.40 with `default-features = false`, meaning the logging surface winit uses is opt-in rather than pre-wired. Serde arrives with serde_derive, bitflags is at 2, and the remaining utility dependencies are cfg_aliases at 0.2.2, cursor-icon at 1.1.0, mint at 0.5.6 and smol_str at 0.3. The examples directory reveals the missing half of the stack, because the dev dependencies include softbuffer at 0.4.8 with the x11, x11-dlopen, wayland and wayland-dlopen features, alongside image at 0.25.0 and tracing-subscriber at 0.3.18. winit does not depend on a renderer, and the examples supply one themselves.
Adding winit means pinning a beta version string
The dependency declaration is the whole of it, and the version in that declaration is the current beta line.
[dependencies]
winit = "0.31.0-beta.4"That string has three parts of meaning for anyone pinning a production build. It is a beta, so the release channel the project ships on master moves. It is not the newest release by date alone, because v0.30.13 was published earlier in 2026 while v0.31.0-beta.4 came after it, and the beta is the one the dependency snippet points at. The repository was last pushed on 2026-11-01, after the 0.31.0-beta.4 tag on 2026-10-24, so commits on master can be ahead of the string in that snippet. Platform-specific code goes through the winit::platform module rather than through the facade.
The dpi package is licensed separately from the facade
One directory in the tree carries a different license story. The note in the repository license section says the license in LICENSE does not apply in full to the dpi package under ./dpi, and points to that folder's own README for the full details. There is a second layer to the note: it does not apply to users of the winit crate, which means the split is a repository level arrangement rather than something a downstream user inherits. That matters for a crate where dpi is both a workspace member and a published dependency at version 0.1.2, because the version you pull from the registry is governed by that package's own terms. Anyone auditing licenses for a dependency tree has two places to read here instead of one. The rest of the tree is standard governance paperwork: CONTRIBUTING.md for contribution rules, CODE_OF_CONDUCT.md, a CHANGELOG.md for release history, and a .git-blame-ignore-revs file for formatting commits that would otherwise pollute blame.
Where the project is maintained and what that means for pinning
The activity pattern is visible in the numbers rather than in prose. The most recent releases are v0.31.0-beta.4 on 2026-10-24, v0.31.0-beta.3 on 2026-09-04, and v0.30.13 on 2026-03-02, and the repository was last pushed on 2026-11-01. Two beta releases of the same line, seven weeks apart, alongside a patch release on the older line, is the shape of a project that maintains in parallel: a stable-ish 0.30 series still receiving fixes while 0.31 sits in beta. What is missing from that picture is any statement of release criteria for leaving beta, so a project depending on it has to decide its own policy about switching to the stable line when it appears. The project keeps a Matrix room for contact, the maintainers meet every Friday at UTC 15 with notes published on hackmd, and bugs go through GitHub issues. Support for the crate's own documentation is at docs.rs/winit.
Editorial conclusion
winit suits a project that wants window creation, event delivery and a raw handle it can pass to a renderer, and that accepts tracking a beta version line such as 0.31.0-beta.4. It does not suit a project wanting text, widgets, a scene graph or a game loop, because none of that is here. Before you commit, read FEATURES.md for what falls inside winit's scope, check the winit::platform module for the backend your target needs, confirm your toolchain satisfies the Rust 1.88 MSRV and the min(sid, stable - 3) upper bound, and remember that Android and Redox answer to different rules.
Frequently asked questions
what is winit in Rust?
winit is a window creation and management library in pure Rust, published under the Apache-2.0 license. It creates windows and delivers the events they produce, such as a resize, a key press or a mouse movement, and is described as a low-level brick in a hierarchy of libraries rather than a framework.
how to use winit for a window in Rust?
Add the dependency to your manifest, then use the platform-specific getters winit provides to get content onto the window, since winit itself draws nothing. Platform-specific usage is documented in the winit::platform module, and features inside winit's scope are covered in FEATURES.md.
Does winit support rendering and graphics on its own?
No. In order to show anything on the window you need the platform-specific getters provided by winit, or another library. For features outside winit's scope, the project points to Are we GUI Yet? and Are we game yet?.
What Rust version does winit require?
The stated Minimum Supported Rust Version is 1.88, and a change to it comes with a minor version bump. As a tentative policy the upper bound is min(sid, stable - 3), where sid is the current rustc version provided by Debian Sid and stable is the latest stable Rust.
Which winit targets are exempt from the MSRV policy?
Android, where a higher Rust version is needed for certain features, so the MSRV is capped at the latest stable Rust minus three, a restriction that is not reflected in Cargo metadata. Redox is also excluded, because it requires a Rust nightly toolchain to compile.
How is the winit workspace split into backend crates?
The workspace declares members as ["dpi", "winit*"] with default-members set to the winit facade alone. Each backend, including winit-x11, winit-wayland, winit-win32, winit-appkit, winit-uikit, winit-android, winit-orbital, winit-web, winit-common and winit-core, pins the same version string.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rust-windowing-winit)Star history chart for your README
[](https://hysenlabs.com/projects/rust-windowing-winit)Was this useful?