Expand description
Enhanced C FFI (Foreign Function Interface) bindings
This module provides comprehensive C-compatible functions for all Supabase features, allowing the library to be used from other programming languages like C, C++, Python, Go, etc.
§Features
- Full API coverage: Auth, Database, Storage, Functions, Realtime
- Async-to-sync bridge for FFI consumers
- Safe memory management with leak prevention
- Comprehensive error handling with detailed context
- Thread-safe operations
§Safety
All FFI functions are marked as unsafe
and require careful handling of
memory management and string encoding.
§Usage
#include "include/supabase.h"
int main() {
SupabaseClient* client = supabase_client_new("https://example.supabase.co", "your-key");
char result[1024];
SupabaseError error = supabase_auth_sign_in(client, "email@example.com", "password", result, sizeof(result));
if (error == SUPABASE_SUCCESS) {
printf("Success: %s\n", result);
}
supabase_client_free(client);
return 0;
}
Structs§
- Supabase
Client - Opaque handle to a Supabase client with runtime
Enums§
- Supabase
Error - Enhanced C-compatible error codes
Functions§
- supabase_
auth_ ⚠sign_ in - Sign in with email and password
- supabase_
auth_ ⚠sign_ up - Sign up with email and password
- supabase_
client_ ⚠free - Free a Supabase client
- supabase_
client_ ⚠new - Create a new Supabase client with async runtime
- supabase_
database_ ⚠insert - Execute a database insert operation
- supabase_
database_ ⚠select - Execute a database select query
- supabase_
functions_ ⚠invoke - Invoke an edge function
- supabase_
get_ ⚠last_ error - Get the last error message
- supabase_
storage_ ⚠list_ buckets - List storage buckets