orpc
Type-safe API layer for building oRPC routers in Rust.
Overview
The main user-facing crate. Provides a builder API for defining procedures with compile-time type safety, middleware composition, and router organization.
Key Concepts
os::<Ctx>()— Entry point for building procedures with the typestate patternRouter<TCtx>— Collection of type-erased procedures, keyed by dot-separated namesrouter!macro — Declarative router definition with nested blocks- Middleware — Compile-time composed context transformations via
use_middleware() ORPCError— Typed error with HTTP status codes matching the oRPC protocol
Example
use *;
async
async
let router = router! ;