Attribute Macro crossmist::main

source ยท
#[main]
Expand description

Setup an entrypoint.

This attribute must always be added to fn main:

#[crossmist::main]
fn main() {
    // ...
}

Without it, starting child processes will panic.

This attribute may be mixed with other attributes, e.g. #[tokio::main]. In this case, this attribute should be the first in the list:

#[crossmist::main]
#[tokio::main(flavor = "current_thread")]
async fn main() {
    // ...
}

If applying the attribute to main is not an option, consider init instead.