Skip to content

Commit 46fe366

Browse files
authored
Fix a missing async_trait annotation in bindgen! (#5747)
Closes #5743
1 parent b0b3f67 commit 46fe366

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
default world foo {
2+
import foo: func()
3+
}

crates/wit-bindgen/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ impl Wasmtime {
364364
}
365365

366366
let world_camel = resolve.worlds[world].name.to_upper_camel_case();
367+
if self.opts.async_ {
368+
uwriteln!(self.src, "#[wasmtime::component::__internal::async_trait]")
369+
}
367370
uwriteln!(self.src, "pub trait {world_camel}Imports {{");
368371
for sig in functions {
369372
self.src.push_str(sig);

0 commit comments

Comments
 (0)