Commit 90fdc63
committed
feat(grpc): scaffold tonic server for rustyred.v1.GraphDatabase (C3 Track 1)
Adds gRPC support to rustyred-server alongside the existing axum HTTP
routes. Single port, content-type sniffing routes application/grpc*
requests to the tonic service tree and everything else stays on the
existing axum handlers.
Files added:
.gitmodules
proto/ (submodule → theorem-protos)
crates/rustyred-server/build.rs (tonic-build compiles rustyred.v1
from the submodule path)
crates/rustyred-server/src/grpc/ (new module)
mod.rs (Routes builder + proto re-export)
service.rs (GraphDatabaseService impl)
Deps added to rustyred-server:
tonic = "0.12"
prost = "0.13"
tower = "0.5"
async-trait = "0.1"
tonic-build = "0.12" (build-dep)
Implemented this commit (vital signs that prove the architecture):
- Health (returns ok + version)
- Ready (mirrors axum /ready handler via store_ready())
- GraphStats (delegates to tenant_graph_store().stats())
PENDING (29 methods stubbed with Status::unimplemented):
Each stub names the axum HTTP route it should mirror, so the
fill-in work is bounded and mechanical. Categories: native query
surface, transactions, node/edge primitives, bulk ingest, vector
search, fulltext, spatial, epistemic traversal, algorithms (PPR,
PageRank, components, communities), verify/rebuild, cache.
Mount pattern (main.rs):
let http = router::build_router(state.clone());
let grpc = grpc::build_grpc_routes(state).into_axum_router();
let app = http.merge(grpc);
axum::serve(listener, app).await
Gates:
cargo build -p rustyred-server : clean (1 pre-existing dead-code warning)
cargo test --workspace : 222 passed, 0 failed
README updated to document the submodule init step.1 parent 1415b86 commit 90fdc63
9 files changed
Lines changed: 662 additions & 10 deletions
File tree
- crates/rustyred-server
- src
- grpc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments