Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/test-programs/src/bin/async_borrowing_caller.rs
1693 views
1
mod bindings {
2
wit_bindgen::generate!({
3
path: "../misc/component-async-tests/wit",
4
world: "borrowing-caller",
5
});
6
7
use super::Component;
8
export!(Component);
9
}
10
11
use bindings::{
12
exports::local::local::run_bool::Guest,
13
local::local::{borrowing::foo, borrowing_types::X},
14
};
15
16
struct Component;
17
18
impl Guest for Component {
19
async fn run(misbehave: bool) {
20
foo(&X::new(), misbehave).await
21
}
22
}
23
24
// Unused function; required since this file is built as a `bin`:
25
fn main() {}
26
27