Expand description
§windows-rdl
The windows-rdl crate compiles RDL (Rust Definition
Language) - a Rust-like text format for describing Windows APIs - into ECMA-335 .winmd metadata,
and back again.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-rdl]
version = "0.100"Use the reader to compile .rdl source into a .winmd, and the writer to regenerate canonical
.rdl from a .winmd:
windows_rdl::reader()
.input("example.rdl")
.output("example.winmd")
.write()
.unwrap();
windows_rdl::writer()
.input("example.winmd")
.output("example.rdl")
.write()
.unwrap();Modules§
- emit
- RDL source-emission primitives shared with the
windows-clangscraper. RDL source-emission primitives shared by the winmd -> RDL writer and the headers -> RDL scraper (windows-clang). Both turn metadata shapes into the same RDL spelling, so the identifier, type, value, and GUID rendering lives here in one place. - formatter
- Helpers for formatting generated RDL source.
- implib
- Reader for COFF import libraries (the SDK
.libarchives), used to recover the function -> DLL mapping that headers do not carry. Reader for SDK COFF import libraries, which record the DLL exporting each symbol.
Structs§
- Arch
Input - One architecture’s RDL directory, compiled winmd, and architecture bitmask.
- Error
- An error produced while reading, writing, or formatting RDL.
- Reader
- Builder that compiles RDL files into
.winmdmetadata. - Writer
- Builder that converts
.winmdmetadata into RDL.
Functions§
- expand_
input_ files - Expands file and directory inputs containing one file type.
- expand_
input_ paths - item_
names - Parses one
.rdlfile and returns the items it defines undernamespace. - merge_
arch_ rdl - Arch-merges per-architecture scrapes and restores the per-header RDL partition.
- reader
- Creates a
Readerthat compiles RDL files into.winmdmetadata. - write_
to_ file - writer
- Creates a
Writerthat converts.winmdmetadata into RDL.