Crate supabase_rs

source ·
Expand description

Supabase SDK for Rust

This is an unofficial Rust SDK for Supabase, since there is no official SDK for Rust yet.

§Cargo.toml

[dependencies]
supabase-rs = "0.2.0"

§Initialize the Supabase Client

use supabase_rs::SupabaseClient;

use dotenv::dotenv;
use std::env::var;

async fn initialize_supabase_client() -> SupabaseClient {
   dotenv().ok();
   let supabase_client: SupabaseClient = SupabaseClient::new(
       var("SUPABASE_URL").unwrap(),
       var("SUPABASE_KEY").unwrap()
       );

       supabase_client
  }

This will initialize the Supabase Client with the Supabase URL and the Supabase Key, and return the Supabase Client to be passed to other methods.

§Tree of contents

§Update

I’ll be adding more methods and enriching the SDK over the next few days, for now!

Modules§

Structs§

Functions§

  • Generates a random UUID to be passed as id when desired