Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

522 B
Raw Blame
mod bindings {
    wit_bindgen::generate!({
        path: "../misc/component-async-tests/wit",
        world: "borrowing-caller",
    });

    use super::Component;
    export!(Component);
}

use bindings::{
    exports::local::local::run_bool::Guest,
    local::local::{borrowing::foo, borrowing_types::X},
};

struct Component;

impl Guest for Component {
    async fn run(misbehave: bool) {
        foo(&X::new(), misbehave).await
    }
}

// Unused function; required since this file is built as a `bin`:
fn main() {}