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

#480 in Parser implementations

Download history 21198/week @ 2024-07-20 17162/week @ 2024-07-27 19911/week @ 2024-08-03 19027/week @ 2024-08-10 17867/week @ 2024-08-17 17233/week @ 2024-08-24 21140/week @ 2024-08-31 17701/week @ 2024-09-07 18785/week @ 2024-09-14 21079/week @ 2024-09-21 19779/week @ 2024-09-28 18206/week @ 2024-10-05 15705/week @ 2024-10-12 16718/week @ 2024-10-19 13680/week @ 2024-10-26 11324/week @ 2024-11-02

59,445 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