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#[cfg(feature = "rest-axum")]
16pub use axum;
17#[cfg(feature = "jsonrpsee")]
18pub use jsonrpsee;
19// --- Macro Re-exports ---
20/// A procedural macro to generate protocol-specific server implementations from a trait impl.
21pub use multi_rpc_macros::multi_rpc_impl;
22/// A procedural macro to define a service trait compatible with `multi-rpc`.
23pub use multi_rpc_macros::multi_rpc_trait;
24/// An attribute to expose a trait method as a REST endpoint. Used with the `rest-axum` feature.
25pub use multi_rpc_macros::rest;
26// It's also common to re-export serde for convenience
27pub use serde;
28#[cfg(feature = "tarpc")]
29pub use tarpc;