5 unstable releases

0.3.2 Feb 12, 2024
0.3.1 Feb 12, 2024
0.2.0 Aug 8, 2023
0.1.2 May 3, 2022
0.1.1 Apr 9, 2022

#1732 in Network programming

Download history 129/week @ 2024-02-11 48/week @ 2024-02-18 39/week @ 2024-02-25 4/week @ 2024-03-03 5/week @ 2024-03-10

101 downloads per month
Used in erldash

MIT/Apache

19KB
364 lines

erl_rpc

erl_rpc Documentation Actions Status Coverage Status License

Erlang RPC Client for Rust.

Examples

smol::block_on(async {
    // Connect to an Erlang node.
    let erlang_node = "foo@localhost";
    let cookie = "cookie-value";
    let client = erl_rpc::RpcClient::connect(erlang_node, 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(())
})

Dependencies

~6–17MB
~206K SLoC