Attribute Macro madsim::main

source · []
#[main]
Available on crate feature macros only.
Expand description

Marks async function to be executed by the selected runtime. This macro helps set up a Runtime without requiring the user to use Runtime directly.

Example

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