[package]
name = "microsandbox-runtime"
description = "Runtime library for the microsandbox sandbox process and microVM entry points."
version.workspace = true
authors.workspace = true
repository.workspace = true
license.workspace = true
edition.workspace = true

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

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

[dependencies]
bytes = { workspace = true }
chrono.workspace = true
clap = { workspace = true, features = ["derive"] }
crossbeam-queue = { workspace = true }
libc.workspace = true
microsandbox-agent-client.workspace = true
microsandbox-db.workspace = true
microsandbox-filesystem.workspace = true
microsandbox-metrics.workspace = true
microsandbox-network = { workspace = true, optional = true }
microsandbox-protocol.workspace = true
microsandbox-types.workspace = true
microsandbox-utils.workspace = true
microsandbox-vsock.workspace = true
msb_krun = { workspace = true, features = ["blk"] }
nix = { workspace = true, features = ["process", "signal"] }
rand.workspace = true
rustls = { workspace = true }
sea-orm.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
tempfile.workspace = true
thiserror.workspace = true
tokio.workspace = true
tracing.workspace = true
zeroize.workspace = true

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_Kernel", "Win32_System_SystemInformation", "Win32_System_Threading"] }

[target.'cfg(unix)'.dependencies]
microsandbox-agent-client = { workspace = true, features = ["uds"] }

[target.'cfg(windows)'.dependencies.microsandbox-agent-client]
workspace = true
features = ["named-pipe"]

[dev-dependencies]
microsandbox-migration.workspace = true
