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
This commit is contained in:
Alex Crichton
2023-02-14 14:54:37 -06:00
committed by GitHub
parent cb150d37ce
commit 255fd6be0a
6 changed files with 34 additions and 55 deletions

View File

@@ -1,20 +1,22 @@
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!({
world: $name,
path: $path,
async: true,
});
}
mod tracing {
wasmtime::component::bindgen!({
world: $name,
path: $path,
world: $name,
tracing: true,
});
}