mrpc
A MessagePack-RPC implementation in Rust.
Features
- Asynchronous RPC servers and clients
- Support for TCP and Unix domain sockets
- Full MessagePack-RPC spec implementation (requests, responses, notifications)
- Bidirectional communication support
- Built on
tokiofor async I/O - Uses
rmpvfor MessagePack serialization
Quick Start
Add this to your Cargo.toml:
[]
= "0.1.0"
Implementing a Server
- Implement the
RpcServicetrait:
use ;
use Value;
;
- Create and run the server:
use Server;
async
Implementing a Client
use Client;
async
Bidirectional Communication
Both servers and clients can handle incoming RPC messages. To enable this for a
client, implement RpcService for it just like you would for a server.
License
This project is licensed under MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.