How do I execute an async/await function without using any external dependencies?
问题 I am attempting to create simplest possible example that can get async fn hello() to eventually print out Hello World! . This should happen without any external dependency like tokio , just plain Rust and std . Bonus points if we can get it done without ever using unsafe . #![feature(async_await)] async fn hello() { println!("Hello, World!"); } fn main() { let task = hello(); // Something beautiful happens here, and `Hello, World!` is printed on screen. } I know async/await is still a nightly