Add only_interfaces and with to the bindgen! macro. (#6160)

* Add `only_interfaces` and `with` to the `bindgen!` macro.

* Add a version of the empty_error test for `only_interfaces` and `with`

* Review feedback

* Add docs
This commit is contained in:
Trevor Elliott
2023-04-10 16:28:52 -07:00
committed by GitHub
parent 4053ae9e08
commit 85f0c68008
5 changed files with 257 additions and 8 deletions

View File

@@ -21,9 +21,17 @@ macro_rules! gentest {
duplicate_if_necessary: true,
});
}
mod interfaces_only {
wasmtime::component::bindgen!({
path: $path,
world: $name,
only_interfaces: true,
});
}
}
// ...
};
}
component_macro_test_helpers::foreach!(gentest);