koi-runtime 0.4.0

Runtime adapter for container/service lifecycle integration
[package]
name = "koi-runtime"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Runtime adapter for container/service lifecycle integration"

[dependencies]
koi-common.workspace = true

# Async runtime
tokio.workspace = true
tokio-stream.workspace = true
tokio-util.workspace = true

# Serialization
serde.workspace = true
serde_json.workspace = true

# HTTP routes
axum.workspace = true
utoipa.workspace = true

# Logging
tracing.workspace = true

# Error handling
thiserror.workspace = true

# Async trait
async-trait.workspace = true

# Docker/Podman backend (optional — see the `docker` feature). futures-util is only used
# by the bollard event stream in docker.rs, so it rides the same feature.
bollard = { version = "0.21", optional = true }
futures-util = { workspace = true, optional = true }

# Timestamps
chrono.workspace = true

[features]
# The Docker/Podman backend (bollard + bollard-stubs' pinned closure) is the only
# optional backend with a heavy, version-locked dependency. Default-on so the
# batteries-included binary and existing consumers are byte-identical; lean library
# consumers opt out with `default-features = false`. The runtime *capability* stays
# unconditional (it is a runtime tunable, never #[cfg]'d) — only the backend *impl* is
# gated. With `docker` off, Auto/Docker/Podman resolve to BackendUnavailable, exactly
# like the already-stubbed systemd/incus/kubernetes backends.
default = ["docker"]
docker = ["dep:bollard", "dep:futures-util", "dep:libc"]

# The Docker integration test imports koi_runtime::docker::* — only build it when the
# backend is compiled, so `--no-default-features` builds/tests stay green.
[[test]]
name = "docker_integration"
required-features = ["docker"]

# Render feature-gated items with a badge on docs.rs.
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

# Platform-specific (libc is used only by docker.rs's podman-socket uid probe)
[target.'cfg(unix)'.dependencies]
libc = { workspace = true, optional = true }