Files
wasmtime/crates/component-macro/tests/codegen.rs
Alex Crichton 255fd6be0a Update world-selection in bindgen! macro (#5779)
* Update world-selection in `bindgen!` macro

Inspired by bytecodealliance/wit-bindgen#494 specifying a world or
document to bindgen is now optional as it's inferred if there's only one
`default world` in a package's documents.

* Add cargo-vet entry
2023-02-14 20:54:37 +00:00

29 lines
744 B
Rust

macro_rules! gentest {
($id:ident $name:tt $path:tt) => {
mod $id {
mod sugar {
wasmtime::component::bindgen!(in $path);
}
mod normal {
wasmtime::component::bindgen!($name in $path);
}
mod async_ {
wasmtime::component::bindgen!({
path: $path,
async: true,
});
}
mod tracing {
wasmtime::component::bindgen!({
path: $path,
world: $name,
tracing: true,
});
}
}
// ...
};
}
component_macro_test_helpers::foreach!(gentest);