Skip to main content

Crate plexus_rpc

Crate plexus_rpc 

Source
Expand description

§Plexus RPC — umbrella crate

The single dependency to add when building a Plexus backend. Re-exports the verified-compatible subcrate set:

  • auth_core — sealed identity, credential, tenant, forwarding, and audit primitives (plexus-auth-core).
  • coreDynamicHub, dispatch, MethodSchema, the Activation trait, credential wire envelope, ChildRouter (plexus-core).
  • macros — procedural macros for activations, methods, child routers, credentials, and auth resolvers (plexus-macros).
  • transport (feature transport, on by default) — WebSocket / HTTP / SSE server runtime (plexus-transport).

§Why one crate

Tracking three or four subcrate version bumps across coordinated releases is error-prone. Depending on plexus-rpc pins the whole set at once:

[dependencies]
plexus-rpc = "0.1"

§Capability manifest

Backends embed CAPABILITIES in their _info response so generic clients (synapse CLI, generated SDKs, agents) can negotiate features instead of guessing from version strings. The manifest names every bundled subcrate version plus a list of named feature flags shipped in this release. See plans/UMB/UMB-3.md for the full design.

§Doc-comment example (current canonical shape)

use plexus_rpc::macros::{activation, method};

pub struct Echo;

#[activation(namespace = "echo", version = "1.0.0")]
impl Echo {
    /// Echo a message back the specified number of times.
    #[method]
    async fn echo(
        &self,
        /// The message to echo
        message: String,
        /// Number of times to repeat
        count: u32,
    ) -> impl futures::Stream<Item = EchoEvent> + Send + 'static {
        async_stream::stream! {
            for _ in 0..count {
                yield EchoEvent::Echo { message: message.clone() };
            }
        }
    }
}

Re-exports§

pub use plexus_auth_core as auth_core;
pub use plexus_core as core;
pub use plexus_macros as macros;
pub use plexus_transport as transport;

Structs§

Capabilities
Compile-time capability manifest describing the subcrate versions and feature flags bundled in this release of plexus-rpc.

Constants§

CAPABILITIES
The canonical compile-time capability manifest for this build of plexus-rpc.
VERSION
Plexus RPC umbrella crate version, populated at compile time.