-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
270 lines (209 loc) · 6.32 KB
/
Cargo.toml
File metadata and controls
270 lines (209 loc) · 6.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
[package]
name = "grpc_graphql_gateway"
version = "1.2.3"
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"] }
# HTTP/3 + QUIC Transport (optional — compile with --features quic)
# quinn: IETF QUIC transport (RFC 9000) — pure Rust, async
quinn = { version = "0.11", optional = true }
# h3: HTTP/3 framing over QUIC (RFC 9114)
h3 = { version = "0.0.8", optional = true }
# h3-quinn: bridges h3 ↔ quinn
h3-quinn = { version = "0.0.10", optional = true }
# rustls: TLS 1.3 — required by QUIC (RFC 9001)
rustls = { version = "0.23", optional = true, features = ["ring"] }
# rustls-pemfile: parse PEM cert/key files for production TLS
rustls-pemfile = { version = "2.0", optional = true }
# rcgen: generate ephemeral self-signed TLS certs for development
rcgen = { version = "0.13", optional = true }
# http-body-util: Full<Bytes> response bodies for H3 handlers
http-body-util = { version = "0.1", optional = true }
# webpki-roots: Mozilla CA bundle for verified TLS in h3_client --secure mode
webpki-roots = { version = "0.26", optional = true }
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"
# BLAKE3 fast cryptographic hash — used for binary entity key hashing in dataloader (BB-06)
blake3 = "1"
warp = { version = "0.4.2", features = ["server"] }
flate2 = "1.1.5"
rayon = "1.10"
# WASM Plugin Sandboxing (optional)
wasmtime = { version = "41.0.4", optional = true }
# 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 = []
wasm = ["wasmtime"]
# quic: HTTP/3 over QUIC/UDP transport
# Enables dual-stack (TCP+HTTP2 alongside UDP+HTTP3) for client and subgraph connections.
# Requires TLS 1.3 certificates (auto-generated for development).
quic = [
"dep:quinn",
"dep:h3",
"dep:h3-quinn",
"dep:rustls",
"dep:rustls-pemfile",
"dep:rcgen",
"dep:http-body-util",
"dep:webpki-roots",
]
[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"
[[bin]]
name = "h3_client"
path = "src/bin/h3_client.rs"
[profile.release]
lto = "fat"
codegen-units = 1
opt-level = 3
panic = "abort"
strip = true