Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/test-programs/src/bin/async_round_trip_direct_stackless.rs
1693 views
1
mod bindings {
2
wit_bindgen::generate!({
3
path: "../misc/component-async-tests/wit",
4
world: "round-trip-direct",
5
});
6
7
use super::Component;
8
export!(Component);
9
}
10
11
struct Component;
12
13
impl bindings::Guest for Component {
14
async fn foo(s: String) -> String {
15
format!(
16
"{} - exited guest",
17
bindings::foo(format!("{s} - entered guest")).await
18
)
19
}
20
}
21
22
// Unused function; required since this file is built as a `bin`:
23
fn main() {}
24
25