Backend protocols in Rust
# How REST, GraphQL, gRPC, WebSockets/SSE and messaging map onto the de-facto crates, with a deep dive per protocol.
❯ cat documents/
-
Backend protocols in Rust — the map
Concept
2026-08-09
How REST, GraphQL, gRPC, WebSockets/SSE and messaging map onto the de-facto crates — axum/reqwest, async-graphql, tonic, tokio-tungstenite, rdkafka/lapin/async-nats.
-
API documentation in Rust
Concept
2026-08-09
OpenAPI, AsyncAPI, protobuf and GraphQL SDL tooling for Axum, Actix Web and Rocket — utoipa and friends, tonic-build, async-graphql SDL export — where derive-macro code-first dominates and contract-first usually means gRPC.
-
GraphQL in Rust
Concept
2026-08-09
async-graphql as the modern default and juniper as the elder — code-first schemas from derives, dataloaders against N+1, subscriptions, and the client-side crates.
-
gRPC in Rust — tonic & prost
Concept
2026-08-09
tonic as the de-facto gRPC stack — prost codegen from .proto, tonic-build and buf, all four streaming modes on Tokio, tower middleware sharing, and the operational endpoints.
-
Messaging in Rust — Kafka, AMQP & NATS
Concept
2026-08-09
rdkafka over librdkafka for Kafka, lapin for RabbitMQ/AMQP, the official async-nats — consumer patterns on Tokio, offset and ack discipline, and serde at the payload boundary.
-
REST & HTTP APIs in Rust
Concept
2026-08-09
Building REST services on axum/actix — serde realities, validation, utoipa and the OpenAPI workflows, error shapes as IntoResponse, and reqwest on the client side.
-
WebSockets & SSE in Rust
Concept
2026-08-09
tokio-tungstenite as the protocol workhorse, axum's WebSocketUpgrade and Sse built-ins, actix-ws, connection-state patterns with channels, and backpressure on Tokio.