{"id":17066112,"url":"https://github.com/cortesi/mrpc","last_synced_at":"2025-04-12T18:24:39.624Z","repository":{"id":250512838,"uuid":"834672747","full_name":"cortesi/mrpc","owner":"cortesi","description":"A MessagePack-RPC implementation for Rust","archived":false,"fork":false,"pushed_at":"2024-12-29T02:25:24.000Z","size":170,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T12:46:36.266Z","etag":null,"topics":["messagepack","messagepack-rpc","rpc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cortesi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T02:16:59.000Z","updated_at":"2025-02-25T14:47:45.000Z","dependencies_parsed_at":"2024-08-06T06:37:40.990Z","dependency_job_id":null,"html_url":"https://github.com/cortesi/mrpc","commit_stats":null,"previous_names":["cortesi/mrpc"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortesi%2Fmrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortesi%2Fmrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortesi%2Fmrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cortesi%2Fmrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cortesi","download_url":"https://codeload.github.com/cortesi/mrpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248611370,"owners_count":21133097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["messagepack","messagepack-rpc","rpc"],"created_at":"2024-10-14T11:05:59.799Z","updated_at":"2025-04-12T18:24:39.596Z","avatar_url":"https://github.com/cortesi.png","language":"Rust","readme":"[![Crates.io](https://img.shields.io/crates/v/mrpc.svg)](https://crates.io/crates/mrpc)\n[![Documentation](https://docs.rs/mrpc/badge.svg)](https://docs.rs/mrpc)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# mrpc\n\nA MessagePack-RPC implementation in Rust.\n\n## Features\n\n- Write asynchronous RPC servers and clients\n- Support for TCP and Unix domain sockets\n- Full msgpack-rpc implementation (requests, responses, notifications)\n- Support for bidirectional communication - both servers and clients can handle incoming RPC messages\n- Built on `tokio` for async I/O\n- Uses `rmpv` for MessagePack serialization\n\n\n## Quick Start\n\n```rust\nuse mrpc::{Client, Connection, Result, RpcSender, Server};\nuse rmpv::Value;\n\n#[derive(Clone, Default)]\nstruct Echo;\n\n#[async_trait::async_trait]\nimpl Connection for Echo {\n    async fn handle_request(\n        \u0026self,\n        _: RpcSender,\n        method: \u0026str,\n        params: Vec\u003cValue\u003e,\n    ) -\u003e Result\u003cValue\u003e {\n        Ok(format!(\"{} -\u003e {}\", method, params[0]).into())\n    }\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    // We're just using the default constructor as our ConnectionMaker\n    let server = Server::from_fn(Echo::default).tcp(\"127.0.0.1:0\").await?;\n    let addr = server.local_addr().unwrap();\n    tokio::spawn(server.run());\n\n    // `Connection` is implemented for (), as a convenience for clients who don't need to handle\n    // requests or responses.\n    let client = Client::connect_tcp(\u0026addr.to_string(), ()).await?;\n    let result = client\n        .send_request(\"echo\", \u0026[Value::String(\"Hello there!\".into())])\n        .await?;\n    println!(\"{}\", result);\n    Ok(())\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcortesi%2Fmrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcortesi%2Fmrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcortesi%2Fmrpc/lists"}