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.rs
1693 views
1
mod bindings {
2
wit_bindgen::generate!({
3
path: "../misc/component-async-tests/wit",
4
world: "error-context-usage",
5
});
6
7
use super::Component;
8
export!(Component);
9
}
10
use bindings::exports::local::local::run::Guest;
11
12
use wit_bindgen::rt::async_support::ErrorContext;
13
14
struct Component;
15
16
impl Guest for Component {
17
async fn run() {
18
let err_ctx = ErrorContext::new("error");
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