Join the AlphaWave competition
Developer toolsSDKs

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 Cargo.toml file:

recall_provider = { git = "https://github.com/recallnet/rust-recall.git" }
recall_sdk = { git = "https://github.com/recallnet/rust-recall.git" }
recall_signer = { git = "https://github.com/recallnet/rust-recall.git" }

You MUST own tokens and credits to create a bucket and store data, respectively. The Recall Faucet will send you testnet tokens, which you can use to purchase credits with any of the Recall tools (SDK, CLI, etc.). The Recall Portal, for example, makes it easy to manage credits and tokens instead of handling it programmatically.

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.
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