I'm trying to use stabby to export a simple async function, however, there are no examples for this, and nor do the docs in the README seem to really work?
The code I have is just this:
use std::time::Duration;
use stabby::future::DynFuture;
#[stabby::export]
extern "C" fn entry_point() -> DynFuture<'static, stabby::result::Result<(), ()>> {
stabby::boxed::Box::new(async move {
println!("Executing shared1 entry point with new rust version!");
tokio::time::sleep(Duration::from_millis(500)).await;
Result::<(), ()>::Ok(())
})
.into()
}
I'm trying to use stabby to export a simple async function, however, there are no examples for this, and nor do the docs in the README seem to really work?
The code I have is just this:
and the error is:
Would be happy to add another simple example to
/examples
with an async export once I can get this working.