[package]
name        = "manta-shared"
description = "Shared types and pure helpers used by both manta-cli and manta-server."
publish     = true
version.workspace      = true
edition.workspace      = true
authors.workspace      = true
license-file           = "LICENSE"
repository.workspace   = true

[lib]
path = "src/lib.rs"

[dependencies]
# Backend traits and shared types (Group, NodeSummary, K8sDetails, etc.)
# plus the structured `Error` type used by helpers throughout this crate.
# csm-rs / ochami-rs are server-only: they implement the backend traits
# and are not needed by manta-cli.
manta-backend-dispatcher = { workspace = true }

serde        = { workspace = true }
serde_json   = { workspace = true }
serde_yaml   = { workspace = true }
chrono       = { workspace = true }
utoipa       = { workspace = true }
minijinja    = { workspace = true }
strum        = { workspace = true }
strum_macros = { workspace = true }
tracing      = { workspace = true }
tracing-subscriber = { workspace = true }
tokio        = { workspace = true }
futures      = { workspace = true }

# common/* helpers: kafka, jwt_ops, config loader, structured error type.
rdkafka            = { workspace = true }
base64             = { workspace = true }
config             = { workspace = true }
dialoguer          = { workspace = true }
directories        = { workspace = true }
toml               = { workspace = true }
toml_edit          = { workspace = true }
reqwest            = { workspace = true }
anyhow             = { workspace = true }
thiserror          = { workspace = true }

[dev-dependencies]
tempfile = "3"

# Tell docs.rs how to render this crate. `all-features = true` ensures
# every cfg-gated item is documented (currently a no-op — we have no
# crate features — but cheap insurance). `rustdoc-args` matches the
# RUSTDOCFLAGS used in CI so the docs.rs build fails fast on broken
# intra-doc links instead of silently shipping rotten cross-refs.
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
