An RPC framework for Rust that defines services in code, eliminating separate schema compilation and language switching.
tarpc is a Remote Procedure Call (RPC) framework for Rust that enables developers to build microservices and distributed systems with minimal boilerplate. It allows service definitions directly in Rust code, eliminating the need for separate schema files and compilation steps. The framework supports features like pluggable transports, cascading cancellation, and distributed tracing to simplify complex service architectures.
Rust developers building microservices, distributed systems, or networked applications who want a native, ergonomic RPC solution without external schema languages.
Developers choose tarpc for its Rust-first approach, which reduces context switching and toolchain complexity compared to frameworks like gRPC. Its focus on ease of use, combined with powerful features like deadline propagation and OpenTelemetry integration, makes it a compelling choice for modern service-oriented architectures.
An RPC framework for Rust with a focus on ease of use.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Services are defined directly in Rust code using attributes, eliminating separate .proto files and compilation steps, which reduces toolchain complexity and context switching.
Any type implementing Stream+Sink can serve as a transport, allowing customization beyond standard TCP (e.g., in-memory channels or custom protocols) without framework limitations.
Cascading cancellation and configurable deadline propagation (default 10s) are automatically handled, improving system reliability by halting unnecessary work and enforcing timely responses.
Instrumented with tracing primitives compatible with OpenTelemetry, enabling distributed tracing across clients and servers for better observability in microservices.
Service definitions are Rust-specific, making it unsuitable for polyglot systems without custom bridging, unlike gRPC which supports multiple languages via .proto files.
While serde serialization is optional, network-based transports require it, adding performance cost compared to raw protocols; the README notes this as a trade-off.
Pluggable transports mean users must implement or configure their own (e.g., via serde_transport feature), increasing initial setup effort versus frameworks with built-in, optimized defaults.
Tarpc is an open-source alternative to the following products: