Skip to content

Latest commit

Β 

History

History
37 lines (26 loc) Β· 1.42 KB

File metadata and controls

37 lines (26 loc) Β· 1.42 KB

windows

The umbrella crate for calling Windows APIs from Rust.

The windows crate projects the entire Windows API surface β€” Win32, COM, and WinRT β€” into idiomatic Rust, generated from the official Windows metadata. It is large, so APIs are gated behind Cargo features named after their namespace; you enable only the modules you use. The API reference shows which feature enables a given type or function.

For new, minimal projects, prefer generating a focused binding with windows-bindgen or composing the smaller windows-* crates documented here.


Internal documentation

The remainder of this page covers how the crate is built and maintained. It is for contributors and is not needed to use windows.

How it's built

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.

Testing

Run cargo test -p windows; see also the workspace test crates.