35 breaking releases

0.66.0 Jan 8, 2026
0.65.0 Oct 6, 2025
0.64.0 Sep 25, 2025
0.62.1 Jun 11, 2025
0.0.0 Oct 18, 2021

#129 in Windows APIs

Download history 41693/week @ 2025-11-30 41076/week @ 2025-12-07 34959/week @ 2025-12-14 17735/week @ 2025-12-21 16996/week @ 2025-12-28 47928/week @ 2026-01-04 58932/week @ 2026-01-11 57505/week @ 2026-01-18 59862/week @ 2026-01-25 64682/week @ 2026-02-01 62391/week @ 2026-02-08 51201/week @ 2026-02-15 56305/week @ 2026-02-22 61616/week @ 2026-03-01 65251/week @ 2026-03-08 61034/week @ 2026-03-15

247,554 downloads per month
Used in 109 crates (13 directly)

MIT/Apache

8.5MB
10K SLoC

Contains (DOS exe, 24MB) default/Windows.Win32.winmd, (Windows exe, 7.5MB) default/Windows.winmd, (DOS exe, 1MB) default/Windows.Wdk.winmd

Code generator for Windows metadata

The windows-bindgen crate automatically generates Rust bindings from Windows metadata.

Start by adding the following to your Cargo.toml file:

[dependencies.windows-link]
version = "0.2"

[build-dependencies.windows-bindgen]
version = "0.63"

Generate Rust bindings in a build script as follows:

let args = [
    "--out",
    "src/bindings.rs",
    "--flat",
    "--sys",
    "--filter",
    "GetTickCount",
];

windows_bindgen::bindgen(args).unwrap();

And then use the bindings as follows:

mod bindings;

unsafe {
    println!("{}", bindings::GetTickCount());
}

Dependencies