[][src]Attribute Macro tokio_async_std::main

#[main]
This is supported on attributes only.

Marks async function to be executed by selected runtime.

Options:

  • max_threads=n - Sets max threads to n.

Function arguments:

Arguments are allowed for any functions aside from main which is special

Usage

Using default

#[tokio::main]
async fn main() {
    println!("Hello world");
}