mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-28 12:31:00 +00:00
24 lines
663 B
Rust
24 lines
663 B
Rust
#[cfg(feature = "io-uring")]
|
|
fn main() -> color_eyre::Result<()> {
|
|
tokio_uring::start(async move {
|
|
pict_rs::PictRsConfiguration::build_default()?
|
|
.install_tracing()?
|
|
.install_metrics()?
|
|
.run()
|
|
.await
|
|
})
|
|
}
|
|
|
|
#[cfg(not(feature = "io-uring"))]
|
|
fn main() -> color_eyre::Result<()> {
|
|
tokio::runtime::Builder::new_multi_thread()
|
|
.enable_all()
|
|
.build()?
|
|
.block_on(async move {
|
|
pict_rs::PictRsConfiguration::build_default()?
|
|
.install_tracing()?
|
|
.install_metrics()?
|
|
.run_on_localset()
|
|
.await
|
|
})
|
|
}
|