10 releases (4 breaking)
| 0.5.3 | Oct 16, 2025 |
|---|---|
| 0.5.0 | Aug 15, 2025 |
| 0.4.2 | Aug 15, 2025 |
| 0.3.2 | Aug 15, 2025 |
| 0.1.1 | Aug 13, 2025 |
#698 in Database interfaces
179 downloads per month
520KB
10K
SLoC
Supabase Rust Client
A comprehensive, production-ready Rust client library for Supabase. This library provides a clean, type-safe, and efficient interface to interact with all Supabase services.
✨ Features
- 🔐 Authentication: Full auth support including MFA, OAuth, Phone Auth, Magic Links, Anonymous Sign-in, and Advanced Token Management
- 💾 Session Management: Cross-tab Sync, Platform Storage, Session Encryption, Session Events
- 🗄️ Database: Advanced Queries, Raw SQL, and Type-safe PostgREST operations
- 📁 Storage: File operations with Resumable Uploads, Advanced Metadata, Storage Policies, and Real-time Events
- 📡 Realtime: WebSocket subscriptions with Presence System, Broadcast Messages, Advanced Filters, and Connection Pooling
- ⚡ Cross-Platform: Full Native (Tokio) and WebAssembly (WASM) support
- 🛡️ Type Safety: Full Rust type system integration
- 🔧 Well Tested: 113 comprehensive tests (41 unit + 72 doc tests)
📦 Installation
Add this to your Cargo.toml:
[dependencies]
supabase-lib-rs = "0.5.3"
tokio = { version = "1.0", features = ["full"] }
Or use cargo to add it:
cargo add supabase-lib-rs
🏃 Quick Start
use supabase::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// Initialize the client
let client = Client::new(
"https://your-project.supabase.co",
"your-anon-key"
)?;
// Authenticate user
let auth_response = client
.auth()
.sign_in_with_email_and_password("user@example.com", "password")
.await?;
println!("User signed in: {:?}", auth_response.user);
// Query database
let posts = client
.database()
.from("posts")
.select("id, title, content")
.eq("status", "published")
.order("created_at", Some(false))
.limit(10)
.execute()
.await?;
println!("Posts: {:?}", posts);
Ok(())
}
📚 Documentation
| Document | Description |
|---|---|
| Examples & Usage Guide | Comprehensive examples for all features |
| Configuration Guide | Setup and configuration options |
| Architecture Guide | Library design and architecture |
| WebAssembly Guide | WASM integration and deployment |
| Testing Guide | Testing setup and guidelines |
| Contributing Guide | Development and contribution guidelines |
| Changelog | Release history and changes |
| Roadmap | Future development plans |
| API Documentation | Complete API reference |
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Quick Development Setup
# Clone the repository
git clone https://github.com/nizovtsevnv/supabase-lib-rs.git
cd supabase-lib-rs
# Setup development environment (requires Nix)
nix develop
# Run all checks
just check
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
🙏 Acknowledgments
- Supabase for providing an amazing backend platform
- The Rust community for excellent crates and tooling
- Contributors who help improve this library
Made with ❤️ for the Rust and Supabase communities
Dependencies
~32–52MB
~601K SLoC