Skip to main content

Crate windows_rdl

Crate windows_rdl 

Source
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-clang scraper. 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 .lib archives), 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§

ArchInput
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 .winmd metadata.
Writer
Builder that converts .winmd metadata into RDL.

Functions§

expand_input_files
Expands file and directory inputs containing one file type.
expand_input_paths
item_names
Parses one .rdl file and returns the items it defines under namespace.
merge_arch_rdl
Arch-merges per-architecture scrapes and restores the per-header RDL partition.
reader
Creates a Reader that compiles RDL files into .winmd metadata.
write_to_file
writer
Creates a Writer that converts .winmd metadata into RDL.