24 breaking releases

0.56.0 Apr 12, 2024
0.55.0 Mar 6, 2024
0.54.0 Feb 27, 2024
0.52.0 Nov 15, 2023
0.34.0 Mar 15, 2022

#442 in Parser implementations

Download history 11781/week @ 2024-01-03 12739/week @ 2024-01-10 13209/week @ 2024-01-17 12810/week @ 2024-01-24 13452/week @ 2024-01-31 12585/week @ 2024-02-07 14480/week @ 2024-02-14 15291/week @ 2024-02-21 15831/week @ 2024-02-28 14940/week @ 2024-03-06 14654/week @ 2024-03-13 14445/week @ 2024-03-20 13841/week @ 2024-03-27 13937/week @ 2024-04-03 14990/week @ 2024-04-10 13481/week @ 2024-04-17

58,663 downloads per month
Used in 107 crates (via windows-bindgen)

MIT/Apache

90KB
2K SLoC

Windows metadata reader

The windows-metadata crate provides a fast reader for Windows metadata files based on the ECMA-335 file format.

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

[dependencies.windows-metadata]
version = "0.56"

Read metadata as needed:

use windows_metadata::*;

fn main() {
    let bytes = std::fs::read(r#"C:\Windows\System32\WinMetadata\Windows.Foundation.winmd"#)
        .expect("File not found");

    let file = File::new(bytes).expect("Invalid metadata");

    let reader = Reader::new(vec![file]);

    for def in reader.get_type_def("Windows.Foundation", "IAsyncInfo") {
        println!("{}", def.name());

        for method in def.methods() {
            println!("{}", method.name());
        }
    }
}

No runtime deps