Crate rapace

Crate rapace 

Source
Expand description

§rapace

crates.io documentation MIT/Apache-2.0 licensed

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:

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.
FrameFlags
Flags carried in each frame descriptor.
MemTransport
MsgDescHot
Hot-path message descriptor (64 bytes, one cache line).
RpcSession
RpcSession owns a transport and multiplexes frames between clients and servers.
StreamTransport
TunnelHandle
A handle identifying a tunnel channel.
TunnelStream
A bidirectional byte stream over a tunnel channel.

Enums§

DecodeError
Decoding errors.
EncodeError
Encoding errors.
ErrorCode
RPC error codes.
RpcError
High-level RPC errors.
Transport
TransportError
Transport-level errors.
ValidationError
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.