windows-rs is a collection of Rust crates that provide bindings and safe wrappers for Windows APIs, from COM and WinRT types to system services, UI frameworks, and raw Win32 functions.
The project solves the problem of safely and ergonomically calling Windows APIs from Rust code. Rather than exposing raw, unsafe bindings directly, it provides layered abstractions: focused crates for specific domains like registry access, window creation, and async operations; core interop crates for COM, WinRT types, and error handling; and code generation tools for custom bindings. This modular approach lets developers choose the right level of abstraction for their use case, from high-level declarative UI libraries down to minimal generated bindings for niche APIs.
Reusable libraries should prefer the focused crates over the broad umbrella crates windows and windows-sys, which add dependency weight and version churn when multiple libraries depend on them. Binary applications can use the umbrella crates with feature flags for broad API coverage. The project explicitly recommends using windows-bindgen to generate minimal project-specific bindings for APIs not covered by existing focused crates, avoiding the dependency bloat of pulling in large umbrella crates for a handful of functions. Developers building UI applications will find declarative UI support through windows-reactor backed by WinUI 3, along with lower-level graphics and composition APIs. Those working with system-level concerns can use crates for registry access, Windows services, version detection, and thread pool management.
The project maintains a large surface area of Windows API coverage through code generation from official metadata rather than hand-written bindings. Development activity shows consistent attention to the focused crate ecosystem, with individual crates covering specific problem domains rather than monolithic catch-all bindings. The project provides detailed crate-specific documentation and usage guidance rather than treating all APIs uniformly.