Skip to main content

Getting Started with Rust


To use the library, we recommend you update Rust to latest stable version $ rustup update stable. Nightly should be fine but some changes might not be compatible.

no_std is not currently supported, but we are working on it in bee, and will provide it as feature once the new implementation is ready.

Using the library#

Using the library is easy, just add it as dependency in your Cargo.toml:

[dependencies]iota-client = { git = "", branch = "dev" }# asynchronous runtimetokio = { version = "1.5", features = ["full"] }

And then you can use the library in your code with use iota_client;.


This example fetches node information

use iota_client::Client;
#[tokio::main]async fn main() {    let iota = Client::builder() // Crate a client instance builder        .with_node("")        .unwrap()        .finish()        .await        .unwrap();
    let info = iota.get_info().await.unwrap();    println!("Nodeinfo: {:?}", info);}