Macro windows::build[][src]

build!() { /* proc-macro */ }

A macro for generating WinRT modules to a .rs file at build time.

This macro can be used to import WinRT APIs from any Windows metadata (winmd) file. It is only intended for use from a crate’s build.rs script.

The macro generates a single build function which can be used in build scripts to generate the WinRT bindings. After using the build macro, call the generated build function somewhere in the build.rs script’s main function.

Usage

To use, you must then specify which types you want to use. These follow the same convention as Rust use paths. Types know which other types they depend on so build will generate any other WinRT types needed for the specified type to work.

Example

The following build! generates all types inside of the Microsoft::AI::MachineLearning namespace.

build!(
    Microsoft::AI::MachineLearning::*
);