Fix a missing async_trait annotation in bindgen! (#5747)

Closes #5743
This commit is contained in:
Alex Crichton
2023-02-08 11:16:40 -06:00
committed by GitHub
parent b0b3f67cb0
commit 46fe366756
2 changed files with 6 additions and 0 deletions

View File

@@ -364,6 +364,9 @@ impl Wasmtime {
}
let world_camel = resolve.worlds[world].name.to_upper_camel_case();
if self.opts.async_ {
uwriteln!(self.src, "#[wasmtime::component::__internal::async_trait]")
}
uwriteln!(self.src, "pub trait {world_camel}Imports {{");
for sig in functions {
self.src.push_str(sig);