include!(env!("BINDINGS"));
use crate::test::common::i_middle::f;
use std::task::Poll;
pub struct Component;
export!(Component);
static mut HIT: bool = false;
impl crate::exports::test::common::i_runner::Guest for Component {
async fn f() {
wit_bindgen::spawn_local(async move {
f().await;
unsafe {
HIT = true;
}
});
std::future::poll_fn(|cx| unsafe {
if HIT {
Poll::Ready(())
} else {
cx.waker().wake_by_ref();
Poll::Pending
}
})
.await;
}
}