Crate windows_bindgen

Crate windows_bindgen 

Source
Expand description

§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());
}

Structs§

Warnings
Contains warnings collected during code generation.

Functions§

bindgen
The conventional way of calling the bindgen function is as follows: