[package]
name        = "manta-server"
description = "Manta HTTP server — single API that proxies to CSM / Ochami backends."
publish     = true
version.workspace      = true
edition.workspace      = true
authors.workspace      = true
license-file           = "LICENSE"
repository.workspace   = true

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

[[bin]]
name = "manta-server"
path = "src/main.rs"

[dependencies]
# Shared crate carries wire types, common helpers, and the backend dispatcher.
manta-shared             = { workspace = true }
manta-backend-dispatcher = { workspace = true }
csm-rs                   = { workspace = true }
ochami-rs                = { workspace = true }

# HTTP server framework
axum              = { version = "0.8", default-features = false, features = ["json", "query", "tokio", "http1", "http2", "ws"] }
axum-server       = { version = "0.8", features = ["tls-rustls"] }
tower-http        = { version = "0.6", features = ["trace", "cors", "timeout"] }
tokio             = { workspace = true }
tokio-util        = { workspace = true }
futures           = { workspace = true }

# OpenAPI + Swagger UI
utoipa            = { workspace = true }
utoipa-swagger-ui = { version = "9", features = ["axum"] }

# TLS bootstrap
rustls         = { version = "0.23", default-features = false, features = ["ring"] }

# Server-side helpers used by service/* and server/common/*
base64             = { workspace = true }
chrono             = { workspace = true }
rdkafka            = { workspace = true }
comfy-table        = "7.2.2"
# Glob-pattern matching for service-layer filters like `get_images`
# `--pattern`. Already a transitive workspace dep via csm-rs; promoting
# to a direct dep here so manta-server's filtering code doesn't depend
# on csm-rs's feature flags keeping it in the graph.
globset            = "0.4"
hostlist-parser    = "0.1.6"
regex              = { workspace = true }
reqwest            = { workspace = true }
serde              = { workspace = true }
serde_json         = { workspace = true }
serde_yaml         = { workspace = true }
tracing            = { workspace = true }

[dev-dependencies]
tower           = { version = "0.5", features = ["util"] }
http-body-util  = "0.1"
wiremock        = "0.6"
tempfile        = "3"
toml            = "0.9"
# `test-util` adds `tokio::time::pause()` so the console-bridge tests
# can fast-forward the inactivity timer without actually sleeping.
tokio           = { workspace = true, features = ["test-util"] }
# AST parsing for the dispatcher-coverage integration test
# (`tests/dispatcher_coverage.rs`). Reads the trait crate's source
# files via `cargo metadata` and the dispatcher wrapper's source via
# `CARGO_MANIFEST_DIR`, then compares trait methods to impl methods.
# `syn` avoids the comment-block false positives a regex would hit;
# `serde_json` parses cargo's metadata output (already a runtime dep,
# listed here is a no-op for selection but documents the test's use).
syn             = { version = "2", features = ["full", "parsing"] }
serde_json      = { workspace = true }

# Suppress cargo-release's per-crate git tag for this crate. The shared
# workspace tag is owned by manta-cli (see its [package.metadata.release]
# block); without `tag = false` here, cargo-release would also cut a
# `manta-server-v*` tag and dist would announce a second GitHub Release
# for the same commit.
[package.metadata.release]
tag = false
