[package]
name = "jammi-server"
description = "OSS Jammi server binary: Arrow Flight SQL, SessionService, TriggerService, and health/metrics endpoints"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
readme = "README.md"

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

[dependencies]
# The candle-free wire substrate: the generated `jammi.v1` stubs (the server
# stubs back this crate's service impls) and the candle-free proto↔domain
# conversions the receive side consumes.
jammi-wire.workspace = true
# The embedded engine (default = `local`): the service impls run inference /
# embeddings / fine-tune / eval in-process, and consume the engine-spec
# converters in `jammi_ai::wire` (TrainingSpec / edge-gather / pipeline).
jammi-ai.workspace = true
jammi-db.workspace = true
jammi-numerics.workspace = true
axum.workspace = true
arrow.workspace = true
arrow-flight.workspace = true
arrow-schema.workspace = true
chrono.workspace = true
clap.workspace = true
datafusion.workspace = true
datafusion-flight-sql-server.workspace = true
futures.workspace = true
prometheus.workspace = true
tonic.workspace = true
tonic-prost.workspace = true
tonic-web.workspace = true
# The gRPC-Web trailers-only repair layer (`grpc_web_trailers`) sits outside
# `tonic-web` and rewrites a trailers-only error response into the in-body
# trailer frame a gRPC-Web client requires. It needs the tower `Layer` trait
# and the low-level HTTP body framing primitives directly.
tower = { workspace = true, features = ["util"] }
http-body.workspace = true
pin-project.workspace = true
bytes = "1"
tokio.workspace = true
tokio-stream.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
uuid.workspace = true
async-trait.workspace = true

[features]
# `train` is on by default so the published image and every default build mount
# the full tier set (all-in-one). It compiles the `FineTuneService` mount (the
# `train` service tier); a `--no-default-features` serve-only build carries no
# training surface and the tier mechanism honestly reports `train` as
# uncompilable. The other optional tiers (`event` = TriggerService, `eval` =
# EvalService) always compile — they carry no heavy dep beyond the engine — and
# are gated at runtime via `[server] services`, not at compile time.
default = ["train"]
train = []
cuda  = ["jammi-ai/cuda"]
metal = ["jammi-ai/metal"]
# Compiles the JetStream broker driver into the binary so production
# deploys can run Postgres + NATS via config without rebuilding from
# source. CI publishes the OSS image with this feature enabled.
jetstream-broker = ["jammi-db/jetstream-broker"]

# Cloud object-store backends for source reads / result-table storage, forwarded
# to jammi-db (which gates each behind object_store's cloud SDKs). The published
# server image enables `storage-cloud` so it is deployment-agnostic — it reads
# r2:// / s3:// / gs:// / azure:// sources without a rebuild. Individual features
# let a deployer compile in only the cloud they use.
storage-s3 = ["jammi-db/storage-s3"]
storage-gcs = ["jammi-db/storage-gcs"]
storage-azure = ["jammi-db/storage-azure"]
storage-r2 = ["jammi-db/storage-r2"]
storage-cloud = ["jammi-db/storage-cloud"]

[dev-dependencies]
tokio.workspace = true
reqwest.workspace = true
jammi-test-utils.workspace = true
# The end-to-end client tests drive the in-process server through the real
# client crates — `DataClient` (data verbs) and `CatalogClient` (control verbs)
# — over a live HTTP/2 channel, proving the wire surface works against a real
# server. Test-only: the server's own code never depends on the clients.
jammi-client.workspace = true
jammi-admin.workspace = true
tempfile = "3"
parquet.workspace = true
# The gRPC integration tests build Arrow IPC payloads and encode raw protos by
# hand to exercise the wire surface end-to-end; the server's own code reaches
# these only through `jammi_ai::wire`, so they are test-only deps.
arrow-ipc.workspace = true
prost.workspace = true
prost-types.workspace = true
# The bring-your-own-auth worked example (`grpc_byo_auth`) mints and verifies a
# generic signed bearer token to drive its custom authenticating interceptor.
# Test-only: the engine authenticates nothing itself — a consumer plugs identity
# in front of the seam, and these are the primitives that example reaches for.
hmac.workspace = true
sha2.workspace = true
hex.workspace = true
