## Rust for Windows The [windows](https://crates.io/crates/windows) and [windows-sys](https://crates.io/crates/windows-sys) crates let you call any Windows API past, present, and future using code generated on the fly directly from the [metadata describing the API](https://github.com/microsoft/windows-rs/tree/master/crates/libs/metadata/default) and right into your Rust package where you can call them as if they were just another Rust module. The Rust language projection follows in the tradition established by [C++/WinRT](https://github.com/microsoft/cppwinrt) of building language projections for Windows using standard languages and compilers, providing a natural and idiomatic way for Rust developers to call Windows APIs. * [Getting started](https://kennykerr.ca/rust-getting-started/) * [Samples](https://github.com/microsoft/windows-rs/tree/0.48.0/crates/samples) * [Releases](https://github.com/microsoft/windows-rs/releases) Start by adding the following to your Cargo.toml file: ```toml [dependencies.windows] version = "0.48" features = [ "Data_Xml_Dom", "Win32_Foundation", "Win32_Security", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging", ] ``` Make use of any Windows APIs as needed: ```rust,no_run use windows::{ core::*, Data::Xml::Dom::*, Win32::Foundation::*, Win32::System::Threading::*, Win32::UI::WindowsAndMessaging::*, }; fn main() -> Result<()> { let doc = XmlDocument::new()?; doc.LoadXml(h!("hello world