SQLite Runtime Resolution
Was this page helpful?
Loading OmniRoute...
(via in )
— fastest, native binary, installed by when build tools are present.
- Runtime-installed
(in )
— installed lazily on first run OR by .
Validates native magic bytes (ELF / Mach-O / PE) before loading
to guard against corrupt or wrong-platform binaries.
(Node ≥22.5 stdlib) — no native build needed; used when
both better-sqlite3 paths fail. Limited feature set.
(WASM) — final fallback. Works everywhere but is slower
and writes data on an interval rather than synchronously.
can fail if the previous
version's is locked by a running process. The runtime
install in sidesteps the global npm cache.
- No build tools: Some environments (corporate Windows without VS Build
Tools, minimal Docker images) cannot compile
. The runtime
installer resolves a pre-built binary from the npm registry; the fallback
drivers ensure OmniRoute still boots even if that fails.
- Air-gapped systems: If the npm registry is unreachable,
or guarantee baseline functionality.
file, OmniRoute reads the first 8 bytes and matches against known platform magics:
| (MZ) |
import { getDriverInfo } from "@/lib/db/core";
const info = getDriverInfo();
// { source: "bundled" | "runtime" | "runtime-installed-now" | "node-sqlite" | "sql-js",
// kind: "better-sqlite3" | "node-sqlite" | "sql-js" }
# Skip postinstall warm-up (for fast CI installs) OMNIROUTE_SKIP_POSTINSTALL=1 npm install -g omniroute # Force-reinstall runtime better-sqlite3 rm -rf ~/.omniroute/runtime omniroute # will reinstall on next start # Check what driver is active omniroute config db-info # (if CLI command exists)
) / exports