readme.md

August 6, 2026 ยท View on GitHub

windows-rs provides Rust crates for Windows APIs, from COM support and system services to UI and raw bindings.

Prefer the focused crates below when they cover the functionality you need. For additional APIs, windows-bindgen can generate a minimal project-specific binding, while windows and windows-sys provide broad API coverage behind feature flags.

Each crate page covers usage and maintenance. Generated API documentation is available on docs.rs.

Crates

Core types and interop

CrateDescription
windows-coreCOM and WinRT types, traits, and authoring macros.
windows-resultWindows error handling and propagation.
windows-stringsWindows string types, conversions, and macros.
windows-linkLinks C-style functions without import libraries.

Values and collections

CrateDescription
windows-collectionsWinRT collections.
windows-numericsGraphics vectors and matrices.
windows-referenceImplementation of WinRT IReference<T>.
windows-timeWinRT DateTime and TimeSpan types.

Async and threading

CrateDescription
windows-futureWinRT asynchronous operations as Rust futures.
windows-threadingSafe wrapper over the Win32 thread pool.

System services

CrateDescription
windows-registrySafe Windows registry access.
windows-servicesSupport for authoring Windows services.
windows-versionQueries the Windows version at runtime.

UI and graphics

CrateDescription
windows-reactorDeclarative UI library backed by WinUI 3.
windows-canvas2D graphics built on Direct2D.
windows-compositionWindows composition visuals.
windows-webviewSafe wrapper around the WebView2 browser control.
windows-windowWindow creation and message dispatch.
windows-animationWrapper around the Windows Animation Manager.
windows-reactor-setupStages the Windows App Runtime.

Code generation and metadata

CrateDescription
windows-clangGenerates RDL from C and C++ headers using libclang.
windows-defaultEmbedded Windows metadata for build tools.
windows-metadataReads and writes ECMA-335 metadata.
windows-rdlParses RDL and generates ECMA-335 metadata.
cppwinrtPackages the C++/WinRT compiler.

Macro implementation

These crates implement macros exported by windows-core. Applications should use the windows-core exports rather than depend on them directly.

CrateDescription
windows-implementImplements the #[implement] macro.
windows-interfaceImplements the #[interface] macro.

Windows API bindings

Use these crates when the focused crates above do not cover the APIs you need.

CrateDescription
windows-bindgenGenerates Rust bindings from Windows metadata.
windowsTyped bindings for C-style, COM, and WinRT APIs.
windows-sysRaw bindings for C-style Windows APIs.