26 breaking releases

0.58.0 Jul 3, 2024
0.56.0 Apr 12, 2024
0.55.0 Mar 6, 2024
0.52.0 Nov 15, 2023
0.34.0 Mar 15, 2022

#522 in Parser implementations

Download history 18611/week @ 2024-08-15 17922/week @ 2024-08-22 18646/week @ 2024-08-29 19175/week @ 2024-09-05 19307/week @ 2024-09-12 18446/week @ 2024-09-19 21593/week @ 2024-09-26 19874/week @ 2024-10-03 15003/week @ 2024-10-10 16282/week @ 2024-10-17 14111/week @ 2024-10-24 14490/week @ 2024-10-31 10731/week @ 2024-11-07 14451/week @ 2024-11-14 11512/week @ 2024-11-21 9411/week @ 2024-11-28

48,780 downloads per month
Used in 97 crates (via windows-bindgen)

MIT/Apache

94KB
2.5K 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.58"

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