Skip to content

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
TablesDBCreate databases, tables, columns, rows. Query with filters, sorting, and pagination.
AccountManage sessions, OAuth, MFA, and user preferences.
UsersManage users, targets, and labels.
TeamsManage teams, memberships, and invites.
StorageCreate buckets, upload and download files.
TokensCreate and manage file tokens for secure file access.
FunctionsCreate, deploy, and manage serverless functions.
MessagingSend emails, SMS, and push notifications through providers like Twilio, Sendgrid, and more.
SitesCreate, deploy, and manage web applications.
LocaleGet user locale, list languages, currencies, countries, and continent information.
AvatarsGenerate 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:

Bash
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

Read next

Ready to build?_