use gdriver_common::config::CONFIGURATION; use super::*; pub async fn start() -> Result<()> { println!("Hello, world!"); let name = "test1".to_string(); let config = &CONFIGURATION; let client: WorldClient = create_client(&config.socket_path).await?; let hello = client .hello(tarpc::context::current(), name.to_string()) .await; match hello { Ok(hello) => println!("{hello:?}"), Err(e) => println!("{:?}", (e)), } Ok(()) } pub async fn create_client(socket_path: impl AsRef) -> Result { let transport = tarpc::serde_transport::unix::connect(socket_path, Json::default) .await .inspect_err(|_| println!("Could not connect"))?; let var_name = WorldClient::new(client::Config::default(), transport); let client = var_name.spawn(); Ok(client) }