22 breaking releases

new 0.54.0 Feb 27, 2024
0.52.0 Nov 15, 2023
0.49.0 Apr 17, 2023
0.48.0 Mar 31, 2023
0.34.0 Mar 15, 2022

#153 in Parser implementations

Download history 14768/week @ 2023-11-07 16427/week @ 2023-11-14 13747/week @ 2023-11-21 14267/week @ 2023-11-28 15719/week @ 2023-12-05 14057/week @ 2023-12-12 11846/week @ 2023-12-19 10244/week @ 2023-12-26 11880/week @ 2024-01-02 13115/week @ 2024-01-09 13517/week @ 2024-01-16 12877/week @ 2024-01-23 13765/week @ 2024-01-30 12839/week @ 2024-02-06 14828/week @ 2024-02-13 13467/week @ 2024-02-20

57,132 downloads per month
Used in 104 crates (via windows-bindgen)

MIT/Apache

91KB
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.53.0"

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