windows-metadata (0.100.0+paring.1)
Published 2026-10-14 03:21:29 +09:00 by paring
Installation
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add windows-metadata@0.100.0+paring.1 --registry forgejoAbout this package
Low-level metadata library for ECMA-335
windows-metadata
The windows-metadata crate reads and writes the ECMA-335 metadata format used by .NET, WinRT, and Win32 metadata.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-metadata]
version = "0.100"
Query a type with the metadata reader:
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);
Details
2026-10-14 03:21:29 +09:00
2026-11-15 19:56:42 +09:00
Assets (1)
Versions (1)
View all
Cargo
5
MIT OR Apache-2.0
46 KiB
0.100.0+paring.1
2026-10-14