diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml index 1264f49e..fa144276 100644 --- a/packages/desktop/Cargo.toml +++ b/packages/desktop/Cargo.toml @@ -30,7 +30,7 @@ tokio = { version = "1.33", features = ["full"] } tracing = "0.1" tracing-subscriber = "0.3" -[target.'cfg(target_os = "windows")'.dependencies] +[target.'cfg(all(target_os = "windows", target_arch = "x86_64"))'.dependencies] komorebi-client = { git = "https://github.com/LGUG2Z/komorebi", rev = "1a8b6a7398b12b3686b80c6228875a79e7165a26" } [target.'cfg(target_os = "macos")'.dependencies] diff --git a/packages/desktop/src/providers/config.rs b/packages/desktop/src/providers/config.rs index 40da9c9a..db431ace 100644 --- a/packages/desktop/src/providers/config.rs +++ b/packages/desktop/src/providers/config.rs @@ -1,6 +1,6 @@ use serde::Deserialize; -#[cfg(windows)] +#[cfg(all(windows, target_arch = "x86_64"))] use super::komorebi::KomorebiProviderConfig; use super::{ battery::BatteryProviderConfig, cpu::CpuProviderConfig, @@ -16,7 +16,7 @@ pub enum ProviderConfig { Cpu(CpuProviderConfig), Host(HostProviderConfig), Ip(IpProviderConfig), - #[cfg(windows)] + #[cfg(all(windows, target_arch = "x86_64"))] Komorebi(KomorebiProviderConfig), Memory(MemoryProviderConfig), Network(NetworkProviderConfig), diff --git a/packages/desktop/src/providers/manager.rs b/packages/desktop/src/providers/manager.rs index a3bbeff5..d4038f96 100644 --- a/packages/desktop/src/providers/manager.rs +++ b/packages/desktop/src/providers/manager.rs @@ -18,7 +18,7 @@ use tracing::{info, warn}; use crate::providers::provider::Provider; -#[cfg(windows)] +#[cfg(all(windows, target_arch = "x86_64"))] use super::komorebi::KomorebiProvider; use super::{ battery::BatteryProvider, config::ProviderConfig, cpu::CpuProvider, @@ -204,7 +204,7 @@ fn create_provider( Box::new(HostProvider::new(config, sysinfo)) } ProviderConfig::Ip(config) => Box::new(IpProvider::new(config)), - #[cfg(windows)] + #[cfg(all(windows, target_arch = "x86_64"))] ProviderConfig::Komorebi(config) => { Box::new(KomorebiProvider::new(config)) } diff --git a/packages/desktop/src/providers/mod.rs b/packages/desktop/src/providers/mod.rs index 662fffbd..bc94fa81 100644 --- a/packages/desktop/src/providers/mod.rs +++ b/packages/desktop/src/providers/mod.rs @@ -4,7 +4,7 @@ pub mod cpu; pub mod host; pub mod interval_provider; pub mod ip; -#[cfg(windows)] +#[cfg(all(windows, target_arch = "x86_64"))] pub mod komorebi; pub mod manager; pub mod memory; diff --git a/packages/desktop/src/providers/variables.rs b/packages/desktop/src/providers/variables.rs index e6337f92..7fbe3716 100644 --- a/packages/desktop/src/providers/variables.rs +++ b/packages/desktop/src/providers/variables.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[cfg(windows)] +#[cfg(all(windows, target_arch = "x86_64"))] use super::komorebi::KomorebiVariables; use super::{ battery::BatteryVariables, cpu::CpuVariables, host::HostVariables, @@ -15,7 +15,7 @@ pub enum ProviderVariables { Cpu(CpuVariables), Host(HostVariables), Ip(IpVariables), - #[cfg(windows)] + #[cfg(all(windows, target_arch = "x86_64"))] Komorebi(KomorebiVariables), Memory(MemoryVariables), Network(NetworkVariables),