Expand description
§rapace
High-performance RPC framework with support for multiple transports (shared memory, TCP, WebSocket) and streaming.
§Features
- Multiple transports: In-process (mem), TCP/Unix socket (stream), WebSocket, and shared memory (SHM)
- Streaming: Full support for server and client streaming RPC calls
- Code generation: Automatic client and server code generation from trait definitions
- Zero-copy: Shared memory transport for ultra-low latency
- Cross-platform: Works on Linux, macOS, Windows, and WebAssembly
§Quick Start
use rapace::service;
#[rapace::service]
pub trait Calculator {
async fn add(&self, a: i32, b: i32) -> i32;
async fn multiply(&self, a: i32, b: i32) -> i32;
}See the examples for more.
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Re-exports§
pub use facet;pub use facet_postcard;pub use rapace_registry as registry;
Modules§
- prelude
- Prelude module for convenient imports.
- server
- Server helpers for running RPC services.
- session
- Session layer for flow control and channel management. Session layer that wraps a Transport and enforces RPC semantics.
- transport
- Transport implementations.
Structs§
- Frame
- Owned frame for sending, receiving, or routing.
- Frame
Flags - Flags carried in each frame descriptor.
- MemTransport
- MsgDesc
Hot - Hot-path message descriptor (64 bytes, one cache line).
- RpcSession
- RpcSession owns a transport and multiplexes frames between clients and servers.
- Stream
Transport - Tunnel
Handle - A handle identifying a tunnel channel.
- Tunnel
Stream - A bidirectional byte stream over a tunnel channel.
Enums§
- Decode
Error - Decoding errors.
- Encode
Error - Encoding errors.
- Error
Code - RPC error codes.
- RpcError
- High-level RPC errors.
- Transport
- Transport
Error - Transport-level errors.
- Validation
Error - Descriptor validation errors.
Functions§
- parse_
error_ payload - Helper to parse an error from a response payload.
Type Aliases§
- Streaming
- Type alias for streaming RPC results.
Attribute Macros§
- service
- Generates RPC client and server from a trait definition.