Macro windows::build [−][src]
build!() { /* proc-macro */ }
Expand description
A macro for generating Windows API bindings to a .rs file at build time.
This macro can be used to import Windows 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 Windows 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 Windows 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::*
);