Agent-readable wiki
connect-rust First 30 Minutes Wiki
connect-rust is a tower-based ConnectRPC runtime for Rust that lets you build and consume gRPC, gRPC-Web, and Connect-protocol services using generated Rust code from .proto files. It ships three crates — a runtime library, a code-generation library, and a build.rs integration — wired together through a Tower service model.
Pages
- Start Here: What This Repo Is & Where to BeginWhat connect-rust is, the three-crate layout (connectrpc / connectrpc-codegen / connectrpc-build), the fastest read order for a new contributor, key vocabulary (ConnectRPC, buffa, Tower service, Spec, StreamType), and which files to open first.
- Build Setup & Code Generation PipelineHow .proto files become Rust service traits: connectrpc-build in build.rs, the protoc-gen-connect-rust buf plugin, the two generation modes (unified vs. service-stubs-only), checked-in generated directories, and the task generate:all workflow.
- Handlers, Router & ConnectRpcServiceThe server-side dispatch path: implementing the generated FooService handler trait, registering methods on Router, wrapping the router in ConnectRpcService (the Tower service), and mounting it with Axum or raw Hyper. Covers unary and streaming handler shapes.
- Interceptors & Spec MetadataRPC-level interceptors as a typed alternative to Tower middleware: Interceptor trait, Next/NextStream continuations, unary vs. streaming intercept surfaces, registration order, and zero-cost opt-out. Also covers Spec (per-method static metadata) and StreamType, which interceptors use to label spans and gate behaviour without re-parsing URLs.
- Protocol, Codec & Client TransportHow the three wire protocols (Connect, gRPC, gRPC-Web) are detected and demultiplexed; envelope framing (5-byte header); codec format selection (proto vs. JSON); compression (gzip, zstd); and the client-side Tower HTTP transport in connectrpc/src/client/. Covers where to look when adding a new codec or compression algorithm.
- After 30 Minutes: What to Try NextSynthesis of what you now understand — the codegen pipeline, Tower dispatch, interceptor chain, and protocol demux — plus concrete next actions: run the conformance suite, walk the examples (eliza, multiservice, streaming-tour, wasm-client), read docs/guide.md sections on TLS and streaming, and understand how task ci gates every PR.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.