talira

windows-rs

Microsoft's Rust crates for calling Windows APIs, from COM and WinRT to system services and raw bindings

open sourceMIT OR Apache-2.0free

windows-rs is Microsoft's set of Rust crates for Windows APIs, from COM and WinRT support and system services to UI and raw bindings. Focused crates cover core types and interop (COM and WinRT types and authoring macros, error handling, strings, linking without import libraries), collections, numerics and time, async and threading and more; the windows and windows-sys crates provide pre-generated bindings for the rest behind feature flags, and windows-bindgen generates a project-specific set. It's dual-licensed MIT or Apache 2.0.

Problems it solves

  • I want to call Win32 APIs from Rust
  • I need to use COM or WinRT from a Rust program
  • I want lightweight raw Windows bindings for my Rust app

Features

  • Rust bindings for Windows APIs
  • COM and WinRT types and authoring macros
  • Focused crates for errors, strings, collections, async and more
  • Pre-generated windows and windows-sys crates behind feature flags
  • windows-bindgen for project-specific bindings

Alternatives

The same job

These do what windows-rs does.

  1. libc Raw bindings to platform APIs for Rust
  2. nix (Rust) Safe Rust bindings to Unix and Linux system APIs

Compare windows-rs with the top 3