Arpy: RPC for Rust
Define your RPC function signatures and use them with various client/server implementations.
Transport Implementations
Currently there are client implmentations for Reqwest and Reqwasm. There are server implementations for Axum and Actix.
Usage
Define your RPC signatures, implement them on the server and call them on the client. These can be in separate crates, or all lumped into one depending on your workflow.
Defining RPC Signatures
;
;
Implementing a Server
We use Axum for this example.
async
async
let app = new
.http_rpc_route
.http_rpc_route;
bind
.serve
.await
.unwrap;
Calling Remote Procedures
We use Reqwasm for this example:
let mut connection = new;
let result = Add.call.await?;
assert_eq!;