supabase-client-sdk
Rust client for Supabase with fluent API — REST by default, direct SQL opt-in.
Installation
[]
= "0.2.1"
# Or with specific features:
= { = "0.2.1", = ["auth", "realtime"] }
Feature Flags
| Feature | Default | Description |
|---|---|---|
query |
Yes | Query builder (select, insert, update, delete, upsert, rpc) |
derive |
Yes | #[derive(Table)] proc macro |
auth |
No | GoTrue authentication client |
realtime |
No | WebSocket realtime subscriptions |
storage |
No | Object storage client |
functions |
No | Edge Functions client |
direct-sql |
No | Direct PostgreSQL via sqlx (bypasses PostgREST) |
full |
No | All features enabled |
Quick Start
use *;
async
Architecture
This is the facade crate that re-exports all sub-crates behind feature flags:
| Crate | Description |
|---|---|
supabase-client-core |
SupabaseClient, config, errors, response types |
supabase-client-query |
Query builder, filters, modifiers, RPC |
supabase-client-derive |
#[derive(Table)] proc macro |
supabase-client-auth |
GoTrue authentication client |
supabase-client-realtime |
WebSocket realtime client |
supabase-client-storage |
Object storage client |
supabase-client-functions |
Edge Functions client |
supabase-client-wasm |
WASM/TypeScript bindings |
Each sub-crate provides an extension trait on SupabaseClient:
SupabaseClientQueryExt—.from(),.from_typed(),.rpc()SupabaseClientAuthExt—.auth()SupabaseClientRealtimeExt—.realtime()SupabaseClientStorageExt—.storage()SupabaseClientFunctionsExt—.functions()
See the repository README for full documentation, examples, and usage guides.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.