pub async fn run<S>(service: S) -> Result<(), CellError>where
S: ServiceDispatch,Expand description
Run a single-service cell
This function handles all the boilerplate for a simple cell:
- Parses CLI arguments
- Waits for SHM file creation
- Sets up SHM transport and RPC session
- Configures the service dispatcher
- Runs the session loop
§Example
ⓘ
use rapace_cell::{run, ServiceDispatch};
use rapace::{Frame, RpcError};
use std::future::Future;
use std::pin::Pin;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let server = MyServiceServer::new(());
run(server).await?;
Ok(())
}