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",
9         imports: { default: trappable },
10     });
11 }
12 
13 pub mod non_concurrent_export_bindings {
14     wasmtime::component::bindgen!({
15         path: "wit",
16         world: "round-trip",
17         exports: { default: ignore_wit | async },
18     });
19 }
20 
21 impl bindings::local::local::baz::HostWithStore for Ctx {
foo<T>(_: &Accessor<T, Self>, s: String) -> wasmtime::Result<String>22     async fn foo<T>(_: &Accessor<T, Self>, s: String) -> wasmtime::Result<String> {
23         yield_times(10).await;
24         Ok(format!("{s} - entered host - exited host"))
25     }
26 }
27 
28 impl bindings::local::local::baz::Host for Ctx {}
29