Skip to content

Implement a #[constellation::main] macro #67

@alecmocatta

Description

@alecmocatta

Currently using tokio with contellation is a bit unwieldy:

fn main() {
    init(Resources::default());

    tokio::runtime::Builder::new()
        .threaded_scheduler()
        .enable_all()
        .build()
        .unwrap()
        .block_on(async {
            ...
        })
}

It could become:

#[constellation::main]
#[tokio::main]
async fn main() {
    ...
}

Or

#[constellation::tokio::main]
async fn main() {
    ...
}

Or just this if we specialise on tokio?

#[constellation::main]
async fn main() {
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions