1 2 3 4 5 6 7 8 9 10 11 12
#![feature(async_await)] use runtime_native::Native; #[runtime::test(Native)] async fn spawn() { let handle = runtime::spawn(async { println!("hello planet from Native"); 42 }); assert_eq!(handle.await, 42); }