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

#444 in Parser implementations

Download history 12771/week @ 2024-01-25 13321/week @ 2024-02-01 12928/week @ 2024-02-08 14907/week @ 2024-02-15 14927/week @ 2024-02-22 15581/week @ 2024-02-29 15165/week @ 2024-03-07 14490/week @ 2024-03-14 14447/week @ 2024-03-21 14101/week @ 2024-03-28 14093/week @ 2024-04-04 14516/week @ 2024-04-11 17251/week @ 2024-04-18 17409/week @ 2024-04-25 17857/week @ 2024-05-02 16146/week @ 2024-05-09

70,796 downloads per month
Used in 108 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