wit-bindgen-cli 0.57.1

CLI tool to generate bindings for WIT documents and the component model.
//@ args = '--async=-all'
//@ wasmtime-flags = '-Wcomponent-model-async'

include!(env!("BINDINGS"));

use crate::a::b::the_test::f;

struct Component;

export!(Component);

impl Guest for Component {
    fn run() {
        wit_bindgen::block_on(async {
            let (tx, rx) = wit_future::new(|| unreachable!());

            let a = tx.write(());
            let b = async { f(rx) };
            let (a_result, ()) = futures::join!(a, b);
            a_result.unwrap();
        });
    }
}