1 mod bindings { 2 wit_bindgen::generate!({ 3 path: "../misc/component-async-tests/wit", 4 world: "round-trip", 5 async: false, 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 format!( 19 "{} - exited guest", 20 baz::foo(&format!("{s} - entered guest")) 21 ) 22 } 23 } 24 25 // Unused function; required since this file is built as a `bin`: main()26fn main() {} 27