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

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

  1. Define services and messages in .proto files.
  2. Generate TrevRPC bindings for Rust, Go, C, C++, Kotlin, or JavaScript.
  3. For servers, implement the generated language service interface; the C++ type is {Service}Service.
  4. Register the implementation with the language runtime's Server.
  5. Create a long-lived native QUIC, HTTP/3, or WebTransport channel.
  6. Build a generated Rust, Go, C, C++, Kotlin, or JavaScript client around that channel.
  7. 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.