[package]
name = "ra2a"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
readme = "../README.md"
authors = ["QNTX"]
description = "A Rust implementation of the Agent2Agent (A2A) Protocol SDK"
keywords = ["a2a", "agent", "protocol", "ai", "rpc"]
categories = ["network-programming", "web-programming"]

[dependencies]
axum = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
chrono.workspace = true
futures.workspace = true
opentelemetry = { workspace = true, optional = true }
prost = { workspace = true, optional = true }
prost-types = { workspace = true, optional = true }
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
sqlx = { workspace = true, optional = true }
thiserror.workspace = true
tokio.workspace = true
tokio-stream = { workspace = true, optional = true }
tonic = { workspace = true, optional = true }
tonic-prost = { workspace = true, optional = true }
google-api-proto = { workspace = true, optional = true }
tracing.workspace = true
tracing-opentelemetry = { workspace = true, optional = true }
uuid.workspace = true

[dev-dependencies]
mockito.workspace = true
pretty_assertions.workspace = true
tokio-test.workspace = true
tracing-subscriber.workspace = true

[build-dependencies]
tonic-prost-build = { workspace = true, optional = true }

[features]
default = ["client", "server"]
client = []
server = ["axum"]
grpc = ["client", "tonic", "prost", "prost-types", "tonic-prost", "tonic-prost-build", "google-api-proto", "base64", "tokio-stream"]
telemetry = ["opentelemetry", "tracing-opentelemetry"]
postgresql = ["sqlx", "sqlx/postgres"]
mysql = ["sqlx", "sqlx/mysql"]
sqlite = ["sqlx", "sqlx/sqlite"]
sql = ["postgresql", "mysql", "sqlite"]
full = ["server", "grpc", "telemetry", "sql"]

[[example]]
name = "client"
path = "examples/client.rs"
required-features = ["client"]

[[example]]
name = "server"
path = "examples/server.rs"
required-features = ["server"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
