When I try cargo build the Rust example posted on the IOTA Chrysalis documentation website Getting Started with Rust

use iota::Client;

async fn main() {
    let iota = Client::builder() // Crate a client instance builder

    let info = iota.get_info().await.unwrap();
    println!("Nodeinfo: {:?}", info);

I am getting the following errors:

enter image description here

I also added

iota-core = { git = "https://github.com/iotaledger/iota.rs", branch = "dev" }

to Cargo.toml

Also when the example is run directly on the website the following errors occur:

enter image description here

Can someone please help me to solve the errors?

1 Answer 1


For this example you also have to add tokio = { version = "1.1", features = ["full"] } to your Cargo.toml like here https://github.com/iotaledger/iota.rs/blob/dev/examples/Cargo.toml

For the website it's only to be viewed there and you can't run it because play.rust-lang.org doesn't have support for the required dependencies


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.