vibesql-wasm-bindings

Crates.iovibesql-wasm-bindings
lib.rsvibesql-wasm-bindings
version0.1.2
created_at2025-12-05 05:50:12.270364+00
updated_at2025-12-05 05:50:12.270364+00
descriptionWebAssembly bindings for vibesql SQL database
homepage
repositoryhttps://github.com/rjwalters/vibesql
max_upload_size
id1967749
size140,411
Robb Walters (rjwalters)

documentation

README

vibesql-wasm-bindings

WebAssembly bindings for VibeSQL SQL database engine.

Overview

This crate provides WebAssembly bindings that allow VibeSQL to run in web browsers and other JavaScript environments. It exposes a clean JavaScript API for executing SQL queries and managing databases.

Features

  • Browser Support: Runs entirely in the browser with no server required
  • OPFS Storage: Persistent storage using Origin Private File System
  • Full SQL Support: Complete SQL:1999 implementation in WASM
  • Type-Safe API: Strongly-typed JavaScript interface
  • JSON Results: Query results serialized as JSON for easy integration
  • Schema Management: Create tables, indexes, views, and more
  • Transaction Support: Full ACID transaction support in the browser

Installation

npm install vibesql-wasm

Usage

import init, { VibeSQL } from 'vibesql-wasm';

// Initialize WASM module
await init();

// Create database instance
const db = new VibeSQL();

// Execute DDL
await db.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name VARCHAR(50))");

// Insert data
await db.execute("INSERT INTO users VALUES (1, 'Alice')");

// Query data
const result = await db.query("SELECT * FROM users");
console.log(result.rows);

Building

# Build the WASM package
wasm-pack build --target web

# Or for Node.js
wasm-pack build --target nodejs

Documentation

License

This project is licensed under either of:

at your option.

Commit count: 3672

cargo fmt