2 ms·
The closest to implicit you can get is the `#[tokio::main]` attribute macro [1], which expands to something like this fn main() { tokio::runtime::B
by pitaj 3y ago
The closest to implicit you can get is the `#[tokio::main]` attribute macro [1], which expands to something like this
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap()
.block_on(async {
println!("Hello world");
})
}
[1]: https://docs.rs/tokio/latest/tokio/attr.main.html#using-the-multi-thread-runtime https://docs.rs/tokio/latest/tokio/attr.main.html#using-the-...