Skip to main content

This library has been deprecated and will no longer be updated. Please consider using the IOTA SDK, that will have the latest features and security updates.

Version: 2.0.1-rc.7

Run Code Examples

Each language has different set up instructions you need to follow to get the code examples up and running.


Before you can run the examples, please refer to the Rust Getting Started guide to install the library.

Clone the Repository

To run the rust examples, you will first need to clone the repository. You can do so by running the following command:

git clone [email protected]:iotaledger/

Set Up Your .env file

After you have cloned the project, you should:

  1. Move into the project directory by running the following command:
  1. Create your .env file by making a copy of the .env.example file by running the following command:
cp .env.example .env

Run Code Examples

The library has numerous examples you can run to get acquainted with the library. After you have followed the instructions to install the library, you can run any example with the following command from the examples directory:

cargo run --example node_api_core_get_health --release

Examples List

You can replace the node_api_core_get_health by any other example from the Rust examples directory.

You can get a full list of examples by running the following command:

cargo run --example