[package]
name = "grpc_graphql_gateway"
version = "1.0.2"
edition = "2021"
authors = ["Protocol Lattice"]
description = "A Rust implementation of gRPC-GraphQL gateway - generates GraphQL execution code from gRPC services"
license = "MIT"
repository = "https://github.com/Protocol-Lattice/grpc_graphql_gateway"
keywords = ["grpc", "graphql", "gateway", "protobuf", "api"]
categories = ["network-programming", "api-bindings", "web-programming"]
default-run = "greeter"

# Disable automatic example discovery (we use [[bin]] targets instead)
autoexamples = false

[dependencies]
# GraphQL
async-graphql = { version = "7.2", features = ["dynamic-schema", "dataloader", "boxed-trait"] }
async-graphql-axum = "7.0"

# gRPC
tonic = { version = "0.12.3", features = ["tls"] }
prost = "0.13"
base64 = "0.22"

# Async
async-trait = "0.1"


# Web framework
axum = { version = "0.8", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "compression-full", "set-header", "timeout"] }

# Async runtime
tokio = { version = "1.0", features = ["full"] }
tokio-stream = "0.1"
async-stream = "0.3"
futures = "0.3"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
prost-types = "0.13"

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# WebSocket support
tokio-tungstenite = "0.21"

# HTTP
http = "1.0"
hyper = { version = "1.0", features = ["full"] }

# Reflection
prost-reflect = "0.15"

# Rate Limiting
governor = "0.6"
nonzero_ext = "0.3"

# Metrics & Observability
prometheus = { version = "0.13", default-features = false }
once_cell = "1.19"

# OpenTelemetry / Distributed Tracing
opentelemetry = "0.21"
opentelemetry_sdk = { version = "0.21", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.14", optional = true }
tracing-opentelemetry = "0.22"

# Automatic Persisted Queries (APQ)
sha2 = "0.10"
hex = "0.4"

# UUID for request ID generation
uuid = { version = "1.0", features = ["v4"] }

# Pattern Matching
regex = "1.10"

# Security - non-poisoning locks
parking_lot = "0.12"

# REST API Connector
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "http2"] }
urlencoding = "2.1"


# Redis for distributed caching
redis = { version = "0.27", features = ["tokio-comp", "connection-manager"] }

# High-performance JSON parsing (SIMD-accelerated)
simd-json = "0.14"

# Lock-free data structures for high concurrency
crossbeam = "0.8"
crossbeam-skiplist = "0.1"

# Fast memory allocator
mimalloc = { version = "0.1", features = ["override"] }

# Zero-copy buffers
bytes = "1.11.1"

# High-performance connection pooling
bb8 = "0.8"

# CPU affinity for optimized thread placement (Linux only)
libc = "0.2"

# Low-level socket configuration (SO_REUSEPORT, backlog tuning)
socket2 = { version = "0.5", features = ["all"] }

# Faster hasher
ahash = "0.8"

# Object pooling
object-pool = "0.6"

# Fast random for benchmarks
fastrand = "2.0"

# LZ4 ultra-fast compression
lz4 = "1.28"
warp = { version = "0.4.2", features = ["server"] }
flate2 = "1.1.5"
rayon = "1.10"

# Live query example dependencies
lazy_static = "1.4"
chrono = { version = "0.4", features = ["serde"] }
notify = { version = "8.2.0", features = ["serde"] }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_System_Threading", "Win32_Foundation"] }

[features]
default = []
otlp = ["opentelemetry-otlp"]
yaml = []

[build-dependencies]
tonic-build = "0.12"

[dev-dependencies]
tokio-test = "0.4"
proptest = "1.4"
warp = "0.4.2"
rand = "0.8"



[lib]
name = "grpc_graphql_gateway"
path = "src/lib.rs"
doctest = false

# Examples as binaries (run with: cargo run --bin <name>)
[[bin]]
name = "graphql"
path = "examples/graphql/main.rs"

[[bin]]
name = "greeter"
path = "examples/greeter/main.rs"

[[bin]]
name = "federation"
path = "examples/federation/main.rs"

[[bin]]
name = "protoc-gen-graphql-template"
path = "src/bin/protoc-gen-graphql-template.rs"

[[bin]]
name = "benchmark"
path = "src/bin/benchmark.rs"

[[bin]]
name = "router"
path = "src/bin/router.rs"

[[bin]]
name = "subgraph-users"
path = "examples/subgraphs/subgraph-users.rs"

[[bin]]
name = "subgraph-products"
path = "examples/subgraphs/subgraph-products.rs"

[[bin]]
name = "subgraph-reviews"
path = "examples/subgraphs/subgraph-reviews.rs"

[[bin]]
name = "live_query"
path = "examples/live_query/main.rs"

[[bin]]
name = "plugin_system"
path = "examples/plugin_system.rs"

[[bin]]
name = "binary_protocol_client"
path = "examples/binary_protocol_client.rs"

[[bin]]
name = "perf_compare"
path = "src/bin/perf_compare.rs"

[[bin]]
name = "decode_gbp"
path = "src/bin/decode_gbp.rs"
