
The Rust for Windows repo also has some simple examples that you can follow. Use the Rust for Windows repo if you have questions about Rust for Windows, or if you wish to report issues with it.

Similar to C++/WinRT, Rust for Windows is an open source language projection developed on GitHub. You can also find Rust documentation for the windows crate over on. The good news is that you can reference the windows crate from your Rust apps, and then immediately beginning calling Windows APIs. Also see Making Win32 APIs more accessible to more languages.Īs a Rust developer, you'll use Cargo (Rust's package management tool)-along with (the Rust community's crate registry)-to manage the dependencies in your projects.

This enables the entire Windows API to be projected in an automated and complete way for consumption by Rust (as well as languages such as C# and C++). This metadata describes the API surface-strongly-typed API signatures, parameters, and types. The win32metadata project aims to provide metadata for Win32 APIs. Whether it's timeless functions such as CreateEventW and WaitForSingleObject, powerful graphics engines such as Direct3D, traditional windowing functions such as CreateWindowExW and DispatchMessageW, or more recent user interface (UI) frameworks such as Composition and Xaml, the windows crate has you covered. Rust for Windows lets you use any Windows API (past, present, and future) directly and seamlessly via the windows crate ( crate is Rust's term for a binary or a library, and/or the source code that builds into one). You can find all of the latest updates in the Release log of the Rust for Windows repo on GitHub. But not only can you use Rust on Windows, you can also write apps for Windows using Rust.


In the Overview of developing on Windows with Rust topic, we demonstrated a simple app that outputs a Hello, world! message.
