Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/test-programs/src/bin/async_error_context_caller.rs
1693 views
1
mod bindings {
2
wit_bindgen::generate!({
3
path: "../misc/component-async-tests/wit",
4
world: "error-context-caller",
5
});
6
7
use super::Component;
8
export!(Component);
9
}
10
use bindings::exports::local::local::run::Guest;
11
12
struct Component;
13
14
impl Guest for Component {
15
async fn run() {
16
let Err(err_ctx) = bindings::local::local::run_result::run_fail().await else {
17
panic!("callee failure run should have produced an error");
18
};
19
_ = err_ctx.debug_message();
20
}
21
}
22
23
// Unused function; required since this file is built as a `bin`:
24
fn main() {}
25
26