vibesql-wasm-bindings 0.1.2

WebAssembly bindings for vibesql SQL database
docs.rs failed to build vibesql-wasm-bindings-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

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.