4 releases

0.1.3 Apr 25, 2024
0.1.2 Jan 20, 2023
0.1.1 Jan 11, 2023
0.1.0 Dec 18, 2022

#126 in WebAssembly

Download history 2/week @ 2024-09-19 6/week @ 2024-09-26 11/week @ 2024-10-03 28/week @ 2024-10-10

219 downloads per month

MIT/Apache

25KB
238 lines

supabase-js-rs

Rust bindings for Supabase JavaScript library via WebAssembly.

Supabase Wasm

Usage

Add supabase-js-rs to Cargo.toml

supabase-js-rs = { version = "0.1.2" }
wasm-bindgen = "0.2.83"

or using a git dependency

supabase-js-rs = { git = "https://github.com/wa1aric/supabase-js-rs", rev = "ada414750f6e5baa2f4729304c53aed3b2d9515e" }
wasm-bindgen = "0.2.83"

Install @supabase/supabase-js as package by adding CDN link to index.html in the root of your crate

<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>

Build and run

trunk serve

Examples

What I've done so far

  • Auth
    • Create a new user
    • Sign in a user
    • Sign in a user through OTP
    • Sign in a user through OAuth
    • Sign out a user
    • Verify and log in through OTP
    • Retrieve a session
    • Retrieve a new session
    • Retrieve a user
    • Update a user
    • Set the session data
    • Listen to auth events
    • Send a password reset request
    • Enroll a factor
    • Create a challenge
    • Verify a challenge
    • Create and verify a challenge
    • Unenroll a factor
    • Get Authenticator Assurance Level
  • Database
    • Fetch data
    • Insert data
    • Update data
    • Upsert data
    • Delete data
    • Call a Postgres function
    • Using filters
    • Using Modifiers
  • Functions
  • Realtime
  • Storage

Dependencies

~0.9–2.8MB
~52K SLoC