Quick Start Guide

This section will help you get started on your Autonomi adventure as quickly as possible. It will walk you through setting up your development environment and writing a simple Autonomi app.

My first App

Let's get right to it and build your first Autonomi app!

Add Autonomi as a Dependency

First import our Autonomi dependency using the language you love:

cargo add autonomi

# Tokio is used for the async runtime, but other ones can be used as well.
cargo add tokio

Setup a Client

To connect to the Autonomi network, we'll need a `Client`:

use autonomi::Client;

#[tokio::main]
async fn main() {
    let client = Client::init()
        .await
        .expect("Could not initialize the client");
}

Download a Dog Picture

What better way is there to show off the capabilities of the network? Let's download a dog picture from this public data address:

After running this code, you'll see a lucky.jpg file downloaded to your work directory!

Last updated