[package]
name = "desktop_core"
edition = { workspace = true }
license = { workspace = true }
version = { workspace = true }
publish = { workspace = true }

[features]
default = [
  "dep:widestring",
  "dep:windows",
  "dep:core-foundation",
  "dep:security-framework",
  "dep:security-framework-sys",
  "dep:zbus",
  "dep:zbus_polkit",
]
manual_test = []

[dependencies]
aes = { workspace = true }
anyhow = { workspace = true }
arboard = { workspace = true, features = [
    "wayland-data-control",
] }
argon2 = { workspace = true, features = ["zeroize"] }
base64 = { workspace = true }
byteorder = { workspace = true }
cbc = { workspace = true, features = ["alloc"] }
homedir = { workspace = true }
pin-project = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
interprocess = { workspace = true, features = ["tokio"] }
log = { workspace = true }
rand = { workspace = true }
russh-cryptovec = { workspace = true }
scopeguard = { workspace = true }
sha2 = { workspace = true }
ssh-encoding = { workspace = true }
ssh-key = { workspace = true, features = [
    "encryption",
    "ed25519",
    "rsa",
    "getrandom",
] }
bitwarden-russh = { workspace = true }
tokio = { workspace = true, features = ["io-util", "sync", "macros", "net"] }
tokio-stream = { workspace = true, features = ["net"] }
tokio-util = { workspace = true, features = ["codec"] }
thiserror = { workspace = true }
typenum = { workspace = true }
pkcs8 = { workspace = true, features = ["alloc", "encryption", "pem"] }
rsa = { workspace = true }
ed25519 = { workspace = true, features = ["pkcs8"] }
bytes = { workspace = true }
sysinfo = { workspace = true, features = ["windows"] }

[target.'cfg(windows)'.dependencies]
widestring = { workspace = true, optional = true }
windows = { workspace = true, features = [
    "Foundation",
    "Security_Credentials_UI",
    "Security_Cryptography",
    "Storage_Streams",
    "Win32_Foundation",
    "Win32_Security_Credentials",
    "Win32_System_WinRT",
    "Win32_UI_Input_KeyboardAndMouse",
    "Win32_UI_WindowsAndMessaging",
    "Win32_System_Pipes",
], optional = true }

[target.'cfg(windows)'.dev-dependencies]
keytar = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = { workspace = true, optional = true }
security-framework = { workspace = true, optional = true }
security-framework-sys = { workspace = true, optional = true }
desktop_objc = { path = "../objc" }

[target.'cfg(target_os = "linux")'.dependencies]
oo7 = { workspace = true }
libc = { workspace = true }

zbus = { workspace = true, optional = true }
zbus_polkit = { workspace = true, optional = true }
