diff --git a/aquatic_udp/src/lib/config.rs b/aquatic_udp/src/lib/config.rs index 1e93d0e..45c150d 100644 --- a/aquatic_udp/src/lib/config.rs +++ b/aquatic_udp/src/lib/config.rs @@ -18,9 +18,9 @@ pub struct Config { pub log_level: LogLevel, pub network: NetworkConfig, pub protocol: ProtocolConfig, - #[cfg(feature = "with-mio")] + #[cfg(any(feature = "with-mio", feature = "with-io-uring"))] pub handlers: HandlerConfig, - #[cfg(feature = "with-mio")] + #[cfg(any(feature = "with-mio", feature = "with-io-uring"))] pub statistics: StatisticsConfig, pub cleaning: CleaningConfig, pub privileges: PrivilegeConfig, @@ -70,7 +70,7 @@ pub struct ProtocolConfig { pub peer_announce_interval: i32, } -#[cfg(feature = "with-mio")] +#[cfg(any(feature = "with-mio", feature = "with-io-uring"))] #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(default)] pub struct HandlerConfig { @@ -80,7 +80,7 @@ pub struct HandlerConfig { pub channel_recv_timeout_microseconds: u64, } -#[cfg(feature = "with-mio")] +#[cfg(any(feature = "with-mio", feature = "with-io-uring"))] #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(default)] pub struct StatisticsConfig { @@ -109,9 +109,9 @@ impl Default for Config { log_level: LogLevel::Error, network: NetworkConfig::default(), protocol: ProtocolConfig::default(), - #[cfg(feature = "with-mio")] + #[cfg(any(feature = "with-mio", feature = "with-io-uring"))] handlers: HandlerConfig::default(), - #[cfg(feature = "with-mio")] + #[cfg(any(feature = "with-mio", feature = "with-io-uring"))] statistics: StatisticsConfig::default(), cleaning: CleaningConfig::default(), privileges: PrivilegeConfig::default(), @@ -143,7 +143,7 @@ impl Default for ProtocolConfig { } } -#[cfg(feature = "with-mio")] +#[cfg(any(feature = "with-mio", feature = "with-io-uring"))] impl Default for HandlerConfig { fn default() -> Self { Self { @@ -153,7 +153,7 @@ impl Default for HandlerConfig { } } -#[cfg(feature = "with-mio")] +#[cfg(any(feature = "with-mio", feature = "with-io-uring"))] impl Default for StatisticsConfig { fn default() -> Self { Self { interval: 0 } diff --git a/aquatic_udp/src/lib/lib.rs b/aquatic_udp/src/lib/lib.rs index 2f3c924..cc4403d 100644 --- a/aquatic_udp/src/lib/lib.rs +++ b/aquatic_udp/src/lib/lib.rs @@ -4,7 +4,7 @@ pub mod common; pub mod config; #[cfg(all(feature = "with-glommio", target_os = "linux"))] pub mod glommio; -#[cfg(feature = "with-mio")] +#[cfg(any(feature = "with-mio", feature = "with-io-uring"))] pub mod other; use config::Config;