winpty-rs-windows-metadata

Crates.iowinpty-rs-windows-metadata
lib.rswinpty-rs-windows-metadata
version0.59.0
created_at2025-08-04 21:58:33.611735+00
updated_at2025-08-04 21:58:33.611735+00
descriptionLow-level metadata library for ECMA-335
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1781258
size143,118
Edgar Andrés Margffoy Tuay (andfoy)

documentation

README

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.winpty-rs-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 winpty_rs_windows_metadata::*;

let index = reader::TypeIndex::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);
Commit count: 1734

cargo fmt