Skip to content

rust-jsonrpc Target

rust-jsonrpc generates Rust JSON-RPC server/client bindings from IDL.

Terminal window
xidlc gen --out-dir out rust-jsonrpc your.idl

After generating, implement the resulting trait and expose the service through xidl_jsonrpc::Server.

Server:

Terminal window
cargo run -p xidlc-examples --example jsonrpc_hello_world_server

Client:

Terminal window
cargo run -p xidlc-examples --example jsonrpc_hello_world_client -- --name World

The generated code is designed to be used with the xidl-jsonrpc runtime by default.