Appwrite Rust SDK
Installation
Or add dependencies manually:
Setting Up the Client
The Rust SDK is async. Use it from a Tokio runtime and authenticate server-side with an API key.
Complete server skeleton
Code Examples
User Management
Database Operations
Note: Use
TablesDBfor new code. Only useDatabasesif the existing project explicitly depends on the legacy Databases API.Rust SDK calling convention: Methods are async, use positional parameters, and represent optional API parameters as
Option<T>. PassNonefor optional values you are not setting.
String Column Types
Note: The legacy
stringcolumn type is deprecated. Use explicit string column types for new tables.
varcharis stored inline and counts toward the 64 KB row size limit. Prefer it for short, indexed fields like names, slugs, and identifiers.text,mediumtext, andlongtextare stored off-page, so they do not consume the row size budget.sizeis not required for these types.
Query Methods
TablesDB methods accept Option<Vec<String>> for queries. Convert each Query to a string.
File Storage
Functions
Permissions
Error Handling
Common Pitfalls
- The Rust SDK is currently a server-side SDK. Prefer TypeScript/Web, Flutter, Apple, Android, or React Native SDKs for browser/mobile client auth flows.
- Always
awaitservice calls. - Pass
Nonefor optional parameters you are not using. - Use
TablesDB, not legacyDatabases, for new database code. - Convert queries with
.to_string()before passing them to APIs that expectOption<Vec<String>>. - Use
serde_json::json!({...})for row data and JSON bodies. - Use
InputFile::from_path(...).await?orInputFile::from_bytes(...)for uploads.

