setup # #[tokio::main] async fn main() { println!("hello"); } [tokio::main] 是宏,会展开成同步代码 fn main() { let mut rt = tokio::runtime::Runtime::new().unwrap(); rt.block_on(async { println!("hello"); }) } !#... 是 attribute