windows-clang 0.100.0

Generates RDL from C/C++ headers using libclang
Documentation

windows-clang

The windows-clang crate scrapes C/C++ headers with libclang and emits RDL (Rust Definition Language) source - the text format understood by windows-rdl. It is the header-facing front end of the Win32 metadata pipeline: headers to RDL (this crate) to .winmd (windows-rdl).

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

[dependencies.windows-clang]
version = "0.100"

Point it at one or more headers and write the resulting per-header RDL, then feed that RDL to windows_rdl::reader() to compile a .winmd:

windows_clang::clang()
    .input("Example.h")
    .output("rdl")
    .namespace("Example")
    .write_by_header()
    .unwrap();