Rust SDK

The official Tuskr Rust SDK for integrating decentralized storage into your Rust and WebAssembly applications.

Installation

Add the crate to your Cargo.toml:

[dependencies]
tuskr = "0.1"

Quick Example

use tuskr::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new("tsk_live_xxxx");

    let result = client
        .upload()
        .file("./image.png")
        .tag("avatar")
        .send()
        .await?;

    println!("Blob ID: {}", result.blob_id);
    println!("URL: {}", result.url);

    Ok(())
}

See Also