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