[package]
name = "qcs-dependencies-client"
version = "0.3.2-dev.3"
description = "Known-compatible versions of gRPC, OpenAPI, OTel, and reqwest crates for QCS client development"
license = "Apache-2.0"
publish = ["crates-io"]

edition.workspace = true
authors.workspace = true
repository.workspace = true
rust-version.workspace = true

[lints]
workspace = true

[features]
## Enables protobuf code generation (prost-based message types and pbjson JSON stubs).
codegen-proto = ["dep:pbjson-build", "dep:prost-build", "dep:tonic-build", "dep:tonic-prost-build"]
grpc = ["dep:pbjson", "dep:pbjson-types", "dep:prost", "dep:prost-types", "dep:tonic", "dep:tonic-prost"]
tokio-current-thread = ["opentelemetry_sdk/rt-tokio-current-thread"]
tonic-health = ["dep:tonic-health"]
tonic-web = ["dep:tonic-web"]
http = ["dep:http", "dep:reqwest", "dep:reqwest-middleware", "dep:reqwest-tracing", "dep:opentelemetry-http"]
tower-http = ["dep:tower-http"]
test = ["opentelemetry_sdk/testing"]

[dependencies]
# gRPC / protobuf (feature: grpc)
pbjson = { workspace = true, optional = true }
pbjson-types = { workspace = true, optional = true }
prost = { workspace = true, optional = true }
prost-types = { workspace = true, optional = true }
tonic = { workspace = true, optional = true }
tonic-health = { workspace = true, optional = true }
tonic-prost = { workspace = true, optional = true }
tonic-web = { workspace = true, optional = true }

# gRPC codegen (feature: codegen-proto, tonic deps also require feature: grpc)
pbjson-build = { workspace = true, optional = true }
prost-build = { workspace = true, optional = true }
# Tonic codegen (feature: grpc)
tonic-build = { workspace = true, optional = true }
tonic-prost-build = { workspace = true, optional = true }

# OpenAPI / HTTP client (feature: http)
http = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true }
reqwest-middleware = { workspace = true, optional = true }
reqwest-tracing = { workspace = true, optional = true }
opentelemetry-http = { workspace = true, optional = true }

# OpenTelemetry (always available)
opentelemetry = { workspace = true }
opentelemetry-otlp = { workspace = true }
opentelemetry_sdk = { workspace = true }
tracing-opentelemetry = { workspace = true }

# Service utilities (always available)
tower = { workspace = true }
tower-http = { workspace = true, optional = true }
