Skip to content
/ erl_rpc Public

Erlang RPC Client for Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

sile/erl_rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(())
})

About

Erlang RPC Client for Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages