talira

sqlite3 (Dart)

SQLite bindings for Dart on native platforms and the web

open sourceMITfree

sqlite3 is a Dart package that binds SQLite through dart:ffi on native platforms and through WebAssembly on the web. With Dart's build hooks it bundles SQLite with the app, so there are no external dependencies or build steps; on the web it uses a specially compiled SQLite WASM module with in-memory, IndexedDB or OPFS file systems. It gives direct, synchronous access; its README points to sqlite_async or sqflite's FFI packages for running queries off the main isolate.

Problems it solves

  • use SQLite from a Dart command-line app
  • embed SQLite in a Flutter app without extra setup
  • run SQLite in a Dart web app

Features

  • dart:ffi bindings to SQLite
  • bundles SQLite through build hooks
  • web support via WebAssembly
  • in-memory, IndexedDB and OPFS file systems on the web

Limitations

  • Synchronous API: run it in a background isolate or web worker for most apps.1

Alternatives

The same job

These do what sqlite3 (Dart) does.

  1. sqflite SQLite plugin for Flutter apps on Android, iOS and macOS

Compare sqlite3 (Dart) with the top 3