aquatic/aquatic_http/src/lib/lib.rs
2021-10-26 21:54:41 +02:00

21 lines
490 B
Rust

use cfg_if::cfg_if;
pub mod config;
pub mod common;
#[cfg(feature = "with-mio")]
pub mod mio;
#[cfg(all(feature = "with-glommio", target_os = "linux"))]
pub mod glommio;
pub const APP_NAME: &str = "aquatic_http: HTTP/TLS BitTorrent tracker";
pub fn run(config: config::Config) -> ::anyhow::Result<()> {
cfg_if! {
if #[cfg(all(feature = "with-glommio", target_os = "linux"))] {
glommio::run(config)
} else {
mio::run(config)
}
}
}