[package]
name = "microsandbox"
description = "`microsandbox` is the core library for the microsandbox project."
version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
edition.workspace = true

[lib]
name = "microsandbox"
path = "lib/lib.rs"

[features]
default = ["prebuilt", "net"]
prebuilt = ["microsandbox-filesystem/prebuilt", "microsandbox-runtime/prebuilt"]
net = ["dep:microsandbox-network", "microsandbox-runtime/net"]

[dependencies]
bytes.workspace = true
chrono.workspace = true
crossterm.workspace = true
docker_credential = "1.3.2"
dirs.workspace = true
flate2.workspace = true
futures.workspace = true
libc.workspace = true
microsandbox-db = { version = "0.3.12", path = "../db" }
microsandbox-filesystem = { version = "0.3.12", path = "../filesystem", default-features = false }
microsandbox-image = { version = "0.3.12", path = "../image" }
microsandbox-migration = { version = "0.3.12", path = "../migration" }
microsandbox-network = { version = "0.3.12", path = "../network", optional = true }
microsandbox-protocol = { version = "0.3.12", path = "../protocol" }
microsandbox-runtime = { version = "0.3.12", path = "../runtime", default-features = false }
microsandbox-utils = { version = "0.3.12", path = "../utils" }
nix = { workspace = true, features = ["process", "signal"] }
reqwest.workspace = true
scopeguard.workspace = true
tar.workspace = true
sea-orm.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
tokio.workspace = true
tracing.workspace = true
typed-builder.workspace = true
which.workspace = true

[build-dependencies]
flate2.workspace = true
tar.workspace = true
ureq.workspace = true

[dev-dependencies]
tempfile.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
keyring = { version = "3.6.3", features = ["apple-native"] }

[target.'cfg(target_os = "windows")'.dependencies]
keyring = { version = "3.6.3", features = ["windows-native"] }

[target.'cfg(target_os = "linux")'.dependencies]
keyring = { version = "3.6.3", features = ["linux-native-sync-persistent", "crypto-rust"] }
