#[tokio_wrap::sync] fn sync_function() -> String { async { tokio::time::sleep(std::time::Duration::from_millis(10)).await; "Hello, async world!".to_string() } .await } fn main() { let result = sync_function(); assert_eq!(result, "Hello, async world!"); }