Skip to content
Blog / Introducing the Appwrite Rust SDK
4 min

Introducing the Appwrite Rust SDK

Appwrite now has an official Rust SDK, bringing type-safe, async-first Appwrite integration to the Rust ecosystem.

Appwrite now supports Rust as an official server SDK. The SDK provides async, type-safe access to all Appwrite server-side APIs and is available on crates.io.

Why Rust

Rust is one of the fastest-growing languages in backend development. Memory safety without garbage collection, zero-cost abstractions, and built-in concurrency make it well-suited for backend services, CLI tools, and infrastructure. With the Rust SDK, developers no longer need to use raw HTTP calls to integrate Appwrite into Rust applications.

The SDK follows the same conventions as existing Appwrite server SDKs for Node.js, Python, and Go, with an idiomatic Rust API surface.

What's included

The SDK supports every Appwrite server-side service:

ServiceWhat you can do
TablesDB
Create databases, tables, columns, rows. Query with filters, sorting, and pagination.
Account
Manage sessions, OAuth, MFA, and user preferences.
Users
Manage users, targets, and labels.
Teams
Manage teams, memberships, and invites.
Storage
Create buckets, upload and download files.
Tokens
Create and manage file tokens for secure file access.
Functions
Create, deploy, and manage serverless functions.
Messaging
Send emails, SMS, and push notifications through providers like Twilio, Sendgrid, and more.
Sites
Create, deploy, and manage web applications.
Locale
Get user locale, list languages, currencies, countries, and continent information.
Avatars
Generate user initials, QR codes, country flags, browser icons, favicons, and webpage screenshots.

The SDK also includes utility modules for building queries, generating IDs, constructing permissions, and working with operators for atomic database updates.

Getting started

Step 1: Set up Appwrite

Set up an Appwrite project by creating an Appwrite Cloud account or self-hosting Appwrite.

Step 2: Install the Rust SDK

Add the SDK and its dependencies to your project:

Shell
cargo add appwrite
cargo add tokio -F full
cargo add serde_json

Step 3: Start building

Initialize the client and make API calls:

Rust
use appwrite::Client;
use appwrite::services::tables_db::TablesDB;
use appwrite::id::ID;
use appwrite::query::Query;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new()
        .set_endpoint("https://fra.cloud.appwrite.io/v1")
        .set_project("<PROJECT_ID>")
        .set_key("<API_KEY>");

    let tables_db = TablesDB::new(&client);

    // Create a database and table
    let db = tables_db.create(ID::unique(), "MyDB", None).await?;
    let table = tables_db.create_table(
        &db.id, ID::unique(), "Tasks",
        None, None, None, None, None,
    ).await?;

    // Create a row
    tables_db.create_row(
        &db.id, &table.id, ID::unique(),
        json!({"title": "Ship Rust SDK", "status": "done"}),
        None, None,
    ).await?;

    // Query rows
    let tasks = tables_db.list_rows(
        &db.id, &table.id,
        Some(vec![
            Query::equal("status", "done").to_string(),
            Query::order_desc("$createdAt").to_string(),
        ]),
        None, None, None,
    ).await?;

    println!("Found {} tasks", tasks.total);
    Ok(())
}

All service methods are async, return a typed Result, and use positional parameters with Option for optional fields. The SDK handles authentication headers, request serialization, and error parsing automatically.

Step 4: Explore the documentation

Follow the Rust quick start guide for a step-by-step walkthrough. You can also use the AI quickstart prompt with tools like Cursor, Claude Code, or Windsurf to set up a project with AI assistance. Rust examples are available across all server SDK documentation pages.

Resources

Start building with Appwrite today

Get started