pict-rs/src/main.rs

25 lines
563 B
Rust
Raw Normal View History

2023-09-24 20:52:31 +00:00
fn main() -> color_eyre::Result<()> {
2023-10-07 17:12:40 +00:00
run()
2023-10-07 16:48:58 +00:00
}
#[cfg(feature = "io-uring")]
2023-10-07 17:12:40 +00:00
fn run() -> color_eyre::Result<()> {
tokio_uring::start(async move {
pict_rs::PictRsConfiguration::build_default()?
.install_tracing()?
.install_metrics()?
.run()
.await
})
2023-10-07 16:48:58 +00:00
}
#[cfg(not(feature = "io-uring"))]
#[tokio::main]
async fn run() -> color_eyre::Result<()> {
pict_rs::PictRsConfiguration::build_default()?
.install_tracing()?
.install_metrics()?
.run_on_localset()
.await
}