Implement a #[constellation::main] macro
alecmocatta opened this issue · 0 comments
alecmocatta commented
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() {
...
}