generated from template/rust
No results
14
Home
trev edited this page 2026-07-13 16:07:54 -04:00
TrevRPC
TrevRPC is an early-stage RPC framework for protobuf services over QUIC, HTTP/3, and WebTransport. The user model is deliberately close to ConnectRPC: write a short protobuf service definition, generate type-safe client and server glue, implement your service, and run it over a production transport.
The important difference is the wire protocol. TrevRPC is not a Connect or gRPC compatibility layer. Current runtimes carry a custom protobuf protocol over native QUIC streams, ordinary HTTP/3 request bodies, or WebTransport streams.
Documentation
- Getting Started
- Protobuf and Code Generation
- Rust Guide
- C++ Guide
- Go Guide
- Kotlin Guide
- JavaScript and TypeScript Guide
- HTTP/3
- WebTransport
- Streaming
- Connection Lifecycle
- Protocol and Wire Format
- Operations, Limits, and Security
- Current Limitations
- Benchmarks
- Local Development
What TrevRPC Provides Today
| Area | Status |
|---|---|
| Schema language | Protocol Buffers |
| RPC shapes | Unary, client streaming, server streaming, bidirectional streaming |
| Rust runtime | trevrpc crate under trevrpc-rust/ |
| Go runtime | trev.zip/llc/trevrpc/trevrpc-go module under trevrpc-go/ |
| C++ runtime | C++20 synchronous Result API under trevrpc-cpp/, built over the byte-oriented trevrpc-c transport |
| Kotlin runtime | Coroutine runtime with Netty and Cronet transports under trevrpc-kotlin/ |
| JavaScript runtime | trevrpc-js browser WebTransport and Node native MsQuic channels plus protobuf.js generator |
| Code generation | Language plugins for Rust, Go, C, C++, Kotlin, and JavaScript |
| C++ protobuf support | Protobuf C++ full and lite generated messages; no protobuf-c dependency |
| TypeScript support | Runtime declarations plus generated .trevrpc.d.ts client declarations |
| Transport | Native QUIC, ordinary HTTP/3, and WebTransport through runtime-specific QUIC and HTTP stacks |
| Connection lifecycle | Long-lived channels reconnect for future calls without retrying, replaying, resuming, or moving RPCs |
| Wire protocol | Length-prefixed protobuf frames, wire version 1 |
| Compatibility | Custom TrevRPC protocol, not gRPC or Connect compatible |
Mental Model
- Define services and messages in
.protofiles. - Generate TrevRPC bindings for Rust, Go, C, C++, Kotlin, or JavaScript.
- For servers, implement the generated language service interface; the C++ type is
{Service}Service. - Register the implementation with the language runtime's
Server. - Create a long-lived native QUIC, HTTP/3, or WebTransport channel.
- Build a generated Rust, Go, C, C++, Kotlin, or JavaScript client around that channel.
- Set deadlines, metadata, authorization, concurrency limits, and metrics through runtime options.
Repository Layout
| Path | Purpose |
|---|---|
trevrpc-rust/ |
Rust runtime, Quinn, HTTP/3, and WebTransport transports, Rust code generator, Rust examples |
trevrpc-go/ |
Go runtime, quic-go HTTP/3 and WebTransport transports, Go code generator, Go examples |
trevrpc-cpp/ |
C++20 synchronous runtime and generator over the trevrpc-c byte transport |
trevrpc-kotlin/ |
Kotlin runtime, Netty and Cronet transports, Kotlin code generator, Kotlin examples |
trevrpc-js/ |
JavaScript WebTransport client runtime, JavaScript/TypeScript code generator, browser example |
wiki/ |
Project wiki documentation |
README.md |
Short repository overview |
Design Priorities
- Performance first.
- Reliability first.
- Predictable behavior under load, restarts, reconnects, partial streams, and shutdown.
- Small runtime APIs with explicit transport configuration.
- Correctness and robustness over short-term convenience.
Quick Links
- Start with Getting Started to use TrevRPC in an application.
- Use Protobuf and Code Generation to generate service bindings.
- Read Rust Guide, Go Guide, C++ Guide, Kotlin Guide, or JavaScript and TypeScript Guide for language API details.
- Read Protocol and Wire Format before implementing a new transport or debugging interoperability.
- Read HTTP/3 before serving ordinary HTTP/3 clients such as Android Cronet.
- Read WebTransport before serving TrevRPC through WebTransport.
- Read Operations, Limits, and Security before deploying a server.
- Read Connection Lifecycle for channel reconnection, generation pinning, readiness, and advanced path migration.
- Read Benchmarks for the current directional native QUIC performance comparison.
- Read Local Development to work on TrevRPC or run checked-in examples.