crossbind
GitHub

SQLite

v3.53.4Database

SQLite 3.53.4, embedded relational database, packaged by crossbind as @crossbind/port-sqlite3 and one package per target. Only a variant that is actually on npm beta is listed as published.

npm install @crossbind/port-sqlite3@beta

Packages

TargetPackagenpm `beta`
Meta package@crossbind/port-sqlite32.0.0-beta.56
Web and Node.js@crossbind/port-sqlite3-wasm2.0.0-beta.56
WASI library@crossbind/port-sqlite3-wasi2.0.0-beta.56
WASI commands@crossbind/port-sqlite3-bin-wasi2.0.0-beta.56
Android@crossbind/port-sqlite3-android2.0.0-beta.56
iOS@crossbind/port-sqlite3-ios2.0.0-beta.56

Install

Install the variant for the platform you build, declare it as a dependency in crossbind.config.js and import the header from JavaScript. Nothing is compiled on your machine. A project that builds for several platforms lists one variant per platform: @crossbind/port-sqlite3-wasi, @crossbind/port-sqlite3-android, @crossbind/port-sqlite3-ios are published too.

shell
npm install @crossbind/port-sqlite3-wasm@beta
crossbind.config.js
import sqlite3Wasm from '@crossbind/port-sqlite3-wasm/crossbind.config.js';
 
export default {
dependencies: [sqlite3Wasm],
paths: { config: import.meta.url },
};

Header import paths are relative to the package's dist/prebuilt/<target>/include, so @crossbind/port-sqlite3/<header>.h is upstream's own header. The full flow, including what the meta package is for, is in the Libraries guide.

WASI command tools

One upstream command ships as npm executables built for wasm32-wasip3. They need wasmtime on PATH and no compiler - see WASI commands.

shell
npm install --global @crossbind/port-sqlite3-bin-wasi@beta
sqlite3-wasi --help
  • sqlite3-wasi

Licence

  • npm license field of @crossbind/port-sqlite3: blessing.
  • The -bin-wasi package lists every statically linked component in its own license field, which is longer than the library licence above.
  • The licence files that ship with the package, and the port recipe, are in the port directory.

Facts on this page come from the port manifests in the repository and from what npm served on beta when the site was built. See the Libraries guide for the full consumer flow.

MORE LIBRARIES
cURLExpatGDALGEOSGeoTIFFiconvLERClibjpeg-turbolibTIFFOpenSSLPROJSpatiaLiteWebPzlibZstandard
Type to search every guide page and section.
↑↓ navigate↵ openesc close