Rust for Windows

I am excited to finally talk about the grand plan we have been working on for some time, namely the unification of the Windows API. No more Win32 here, WinRT there, COM this, UWP that. Just stop it. Rust for Windows lets you use any Windows API directly and seamlessly via the windows crate.

Whether its timeless functions like CreateEvent and WaitForSingleObject, powerful graphics engines like Direct3D, traditional windowing functions like CreateWindowEx and DispatchMessage, or more recent UI frameworks like Composition and Xaml, the windows crate has you covered.

This is an early preview, but finally having metadata for the entire Windows API is a huge step toward making Windows development easier and more approachable for all developers.

The repo has everything you need to get started:

https://github.com/microsoft/windows-rs/

In particular, the readme has a short guide to getting started. There are also some simple examples that you can follow. And of course, we have updated Robert Mikhayelyan’s Minesweeper port.

If having the entire Windows API at your fingertips seems a little daunting, I have also published some Rust documentation for the Windows API. This lets you browse or search for just the API you need and makes it a lot easier to find what you are looking for.

If you have questions or run into issues, please use the GitHub repo to get in touch.

Repo: https://github.com/microsoft/windows-rs

API docs: https://microsoft.github.io/windows-docs-rs

Samples: https://github.com/kennykerr/samples-rs

https://blogs.windows.com/windowsdeveloper/2021/01/20/making-win32-apis-more-accessible-to-more-languages