multi_rpc/
lib.rs

1//! A procedural macro-based library to define a Rust service trait once and serve it over multiple RPC protocols.
2
3/// The multi-rpc prelude for convenient importing of the most common items.
4pub mod prelude;
5
6/// Contains the `ServerBuilder` for configuring and launching servers.
7pub mod builder;
8/// Contains the error types used by the library.
9pub mod error;
10/// Contains the `ServerRunner` for managing running server tasks.
11pub mod runner;
12
13// --- Public Dependency Re-exports (For Version Safety) ---
14
15// It's common to re-export serde for convenience
16#[cfg(feature = "rest-axum")]
17pub use axum;
18#[cfg(feature = "jsonrpsee")]
19pub use jsonrpsee;
20// --- Macro Re-exports ---
21/// A procedural macro to generate protocol-specific server implementations from a trait impl.
22pub use multi_rpc_macros::multi_rpc_impl;
23/// A procedural macro to define a service trait compatible with `multi-rpc`.
24pub use multi_rpc_macros::multi_rpc_trait;
25/// An attribute to expose a trait method as a REST endpoint. Used with the `rest-axum` feature.
26pub use multi_rpc_macros::rest;
27pub use serde;
28#[cfg(feature = "tarpc")]
29pub use tarpc;