@codebolt/sqlite-wasm-vec
v0.1.0
Published
CodeBolt SQLite WASM build with sqlite-vec statically registered
Readme
@codebolt/sqlite-wasm-vec
SQLite compiled to WebAssembly for Node.js with the sqlite-vec extension
statically registered.
The runtime API intentionally mirrors node-sqlite3-wasm:
const { Database } = require('@codebolt/sqlite-wasm-vec');
const db = new Database('project.db');sqlite-vec is registered through SQLite's SQLITE_EXTRA_INIT hook, so every
opened database can use vec_version() and vec0 without loading a native
extension.
Build
Docker is required because the build uses the Emscripten SDK image:
npm run build
npm testThe build downloads SQLite's amalgamation source and compiles:
- SQLite with CodeBolt's Node filesystem VFS
vendor/sqlite-vec.csrc/vec-auto-extension.c, which registerssqlite3_vec_init
The package publishes only dist/sqlite-wasm-vec.js,
dist/sqlite-wasm-vec.wasm, and TypeScript declarations.
