tarpc is an asynchronous RPC framework for Rust that embraces Rust’s type system and futures to generate ergonomic client and server stubs. Services are declared in pure Rust, and procedural macros expand those definitions into request/response types, trait implementations, and strongly typed stubs. The framework is transport-agnostic: it commonly uses Tokio with serde-based codecs, but you can plug in your own framing and serialization. It bakes in RPC concerns such as deadlines, cancellation, and context propagation so production behavior is predictable under load. The programming model feels native—call methods on a client stub and await results—while the server side exposes clean concurrency primitives for handling many requests. Because the interface is just Rust code, refactoring and IDE tooling work naturally without an external IDL.
Features
- Service definitions in Rust with macro-generated stubs
- Async/await integration atop Tokio and futures
- Pluggable transports and serde codecs
- Deadlines, cancellation, and per-request context
- Strongly typed requests and responses without an external IDL
- Easy testing via in-process transports and mock services