Skip to content

Commit

Permalink
feat: exclude komorebi provider on 32bit target
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Feb 29, 2024
1 parent 2dd248b commit 45a9344
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/providers/config.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/providers/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/src/providers/variables.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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),
Expand Down

0 comments on commit 45a9344

Please sign in to comment.