27 breaking releases

0.59.0 May 15, 2025
0.58.0 Jul 3, 2024
0.57.0 Jun 7, 2024
0.55.0 Mar 6, 2024
0.34.0 Mar 15, 2022

#94 in Windows APIs

Download history 33723/week @ 2025-06-06 34287/week @ 2025-06-13 30903/week @ 2025-06-20 25414/week @ 2025-06-27 24724/week @ 2025-07-04 26682/week @ 2025-07-11 41378/week @ 2025-07-18 41136/week @ 2025-07-25 33988/week @ 2025-08-01 36749/week @ 2025-08-08 40012/week @ 2025-08-15 37593/week @ 2025-08-22 29489/week @ 2025-08-29 39401/week @ 2025-09-05 16769/week @ 2025-09-12 20553/week @ 2025-09-19

112,561 downloads per month

MIT/Apache

130KB
3.5K SLoC

Low-level metadata library for ECMA-335

The windows-metadata crate provides a reader and writer for the ECMA-335 metadata format used by .NET, WinRT, and more recently the Win32 metadata.

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

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

Use the Windows metadata support as needed. Here is how you might use the reader to query type information:

use windows_metadata::*;

let index = reader::Index::read("Windows.winmd").unwrap();

let def = index.expect("Windows.Foundation", "Point");
assert_eq!(def.namespace(), "Windows.Foundation");
assert_eq!(def.name(), "Point");

let extends = def.extends().unwrap();
assert_eq!(extends.namespace(), "System");
assert_eq!(extends.name(), "ValueType");

let fields: Vec<_> = def.fields().collect();
assert_eq!(fields.len(), 2);
assert_eq!(fields[0].name(), "X");
assert_eq!(fields[1].name(), "Y");
assert_eq!(fields[0].ty(), Type::F32);
assert_eq!(fields[1].ty(), Type::F32);

No runtime deps