绝大多数第一次接触 Async Rust 的开发者所写的 Hello World 程序是下面这样的: 1 2 3 4 5 6 7 8 9 10 11 12 13 asyncfnsay_world() { println!("world"); } #[tokio::main] asyncfnmain() { // Calling `say_world()` does not execute the body of `say_world()`. letop = say_world(); // This println! comes first println!("hello"); // Calling `.await` on `op` starts executing `say_world`. op.await; } 目前最流行的 Rust Async Runtime tokio 告诉你,只要在 main 函数前加...