The umbrella crate for calling Windows APIs from Rust.
- 馃摝 crates.io
- 馃摉 docs.rs
- 馃殌 Getting started
- 馃З Samples
- 馃搧 Source
The windows crate projects Win32, COM, and WinRT APIs from Windows metadata. APIs are gated by
Cargo features, such as combaseapi and Foundation_Collections. The
API reference lists the required feature for each item.
Use windows for broad API coverage and ergonomic wrappers. Use
windows-sys for raw bindings, or
windows-bindgen to generate a smaller binding set.
The remainder of this page covers how the crate is built and maintained. It is for contributors and
is not needed to use windows.
The published crate is generated by tool_package (which drives windows-bindgen in --package
mode) from crates/tools/package/src/windows.txt. Only src/Windows/mod.rs and per-namespace files
are generated; src/lib.rs is hand-maintained and intentionally serves a docs.rs stub that points
to the external API docs site.
Run cargo test -p windows; see also the workspace test crates.