Join the AlphaWave competition
Developer resources/Developer tools/SDKs

Rust SDK

Set up the Recall SDK in your Rust environment.


The Recall SDK is a Rust library that provides a simple interface for interacting with Recall buckets. It is designed to be easy to use and flexible, allowing you to build applications that interact with buckets in a variety of ways.

There are two primary crates that are used in tandem with the Recall SDK crate. All three may be required, depending on the use case, so let's break down what each crate does:

  • recall_provider: Provides the means to interact with the bucket storage system via a chain and object provider.
  • recall_signer: A transaction signer to help manage sending transactions to the subnet.
  • recall_sdk: The Recall SDK itself, which provides a simple interface for interacting with Recall and uses the other two crates to do so.

Installation

To use the Recall SDK in your Rust project, add the following dependencies to your project:

cargo add recall_sdk recall_provider recall_signer

Additional dependencies

We'll also use the following, which are common for handling asynchronous network operations:

  • tokio: Async file operations.
  • async-tempfile: Create async temporary files when adding or getting objects.
cargo add tokio async-tempfile

Make sure you enable the fs, macros, and rt-multi-thread features for tokio:

async-tempfile = "0.6.0"
tokio = { version = "1.37.0", features = ["fs", "macros", "rt-multi-thread"] }

Next steps

Continue onward to see how to connect to the network and interact with buckets!

On this page