erl_rpc

erl_rpc Documentation Actions Status Coverage Status License

Erlang RPC Client for Rust.

Examples

```rust smol::blockon(async { // Connect to an Erlang node. let erlangnode = "foo@localhost"; let cookie = "cookie-value"; let client = erlrpc::RpcClient::connect(erlangnode, cookie).await?; let mut handle = client.handle();

// Run the RPC client as a background task.
smol::spawn(async {
    if let Err(e) = client.run().await {
        eprintln!("RpcClient Error: {}", e);
    }
}).detach();

// Execute an RPC: `erlang:processes/0`
let result = handle
    .call("erlang".into(), "processes".into(), erl_dist::term::List::nil())
    .await?;
println!("{}", result);
Ok(())

}) ```