1 use super::Ctx; 2 use crate::util::yield_times; 3 use wasmtime::component::Accessor; 4 5 pub mod bindings { 6 wasmtime::component::bindgen!({ 7 path: "wit", 8 world: "round-trip-direct", 9 }); 10 } 11 12 impl bindings::RoundTripDirectImportsWithStore for Ctx { foo<T>(_: &Accessor<T, Self>, s: String) -> String13 async fn foo<T>(_: &Accessor<T, Self>, s: String) -> String { 14 yield_times(5).await; 15 format!("{s} - entered host - exited host") 16 } 17 } 18 19 impl bindings::RoundTripDirectImports for Ctx {} 20