Manual
fn main() {
let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
let fut = MyFuture {};
rt.block_on(fut);
}
With macro
#[tokio::main(flavor = "current_thread")]
async fn main() {
let fut = MyFuture {};
fut.await
}