1 mod bindings { 2 wit_bindgen::generate!({ 3 inline: " 4 package echo:echo; 5 world echo { 6 export echo: interface { 7 echo: async func(echo: string) -> string; 8 } 9 } 10 ", 11 }); 12 13 use super::Component; 14 export!(Component); 15 } 16 17 struct Component; 18 19 impl bindings::exports::echo::Guest for Component { 20 async fn echo(s: String) -> String { 21 s 22 } 23 } 24 25 // Unused function; required since this file is built as a `bin`: 26 fn main() {} 27