Skip to main content

Getting Started with Rust

Getting Started with Rust​

Requirements​

  • Rust (latest)
  • Cargo (latest)
  • for running example: a local network node with the IOTA Hierarchies package deployed as described here

Include the Library​

To include IOTA Hierarchies in your project, add it as a dependency in your Cargo.toml:

[dependencies]
hierarchies = { git = "https://github.com/iotaledger/hierarchies", tag = "v0.1"}

Examples​

To try out the examples, you should:

  1. Clone the repository:
git clone https://github.com/iotaledger/hierarchies
  1. Build the repository:
cargo build
  1. Run your first example:
cargo run --example 01_create_federation

API Reference​

You can find the API reference for the Rust library here.

If you would like to build the documentation, locally you can do so with the following command:

RUSTDOCFLAGS='--cfg docsrs' cargo +nightly doc -p hierarchies --all-features --no-deps --open