mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
22 lines
496 B
Rust
22 lines
496 B
Rust
use cfg_if::cfg_if;
|
|
|
|
pub mod common;
|
|
pub mod config;
|
|
#[cfg(all(feature = "with-glommio", target_os = "linux"))]
|
|
pub mod glommio;
|
|
#[cfg(feature = "with-mio")]
|
|
pub mod mio;
|
|
|
|
use config::Config;
|
|
|
|
pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker";
|
|
|
|
pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|
cfg_if! {
|
|
if #[cfg(all(feature = "with-glommio", target_os = "linux"))] {
|
|
glommio::run(config)
|
|
} else {
|
|
mio::run(config)
|
|
}
|
|
}
|
|
}
|