Skip to main content

build_plexus_rpc

Function build_plexus_rpc 

Source
pub async fn build_plexus_rpc() -> Arc<DynamicHub>
Expand description

Build the Plexus RPC hub with registered activations

The hub implements the Plexus RPC protocol and provides introspection methods:

  • substrate.call: Route calls to registered activations
  • substrate.hash: Get configuration hash for cache invalidation
  • substrate.list_activations: Enumerate registered activations
  • substrate.schema: Get full Plexus RPC schema

Hub activations (with nested children) are registered with register_hub to enable direct nested routing like substrate.solar.mercury.info.

This function uses Arc::new_cyclic to inject a weak reference to the hub into Cone and ClaudeCode, enabling them to resolve foreign handles through the hub without creating reference cycles.

This function is async because Arbor, Cone, and ClaudeCode require async database initialization.