bitrpc
A simple Rust RPC library using bitcode serialization with optional high-performance transports.
Features
- Runtime-agnostic core - No async runtime dependency, bring your own transport
- Procedural macros to generate type-safe RPC client/server code
- Pluggable transports:
cyper
- HTTP3 client transportcompio-quic
- QUIC/HTTP3 with io_uring via compiocompio-server
- Multi-threaded server with io_uring
Usage
Define your service
use ;
Implement the server
;
// With compio-server feature:
let server = new
.serve
.await?;
Call from client
use CyperTransport;
let mut client = new;
let response = client.add.await?;
Implement custom transport
The core library is runtime-agnostic. Implement the RpcTransport
trait for any async runtime:
use ;
Features
Enable optional transports in Cargo.toml
:
[]
= { = "0.2", = ["cyper"] } # HTTP3 client
= { = "0.2", = ["compio-server"] } # io_uring server
License
MIT