1 mod bindings {
2     wit_bindgen::generate!({
3         path: "../misc/component-async-tests/wit",
4         world: "round-trip",
5         async: ["-export:local:local/baz#foo"],
6     });
7 
8     use super::Component;
9     export!(Component);
10 }
11 
12 use bindings::{exports::local::local::baz::Guest as Baz, local::local::baz};
13 
14 struct Component;
15 
16 impl Baz for Component {
foo(s: String) -> String17     fn foo(s: String) -> String {
18         wit_bindgen::block_on(async move {
19             format!(
20                 "{} - exited guest",
21                 baz::foo(format!("{s} - entered guest")).await
22             )
23         })
24     }
25 }
26 
27 // Unused function; required since this file is built as a `bin`:
main()28 fn main() {}
29