- add 3Y/5Y/10Y financial history filtering and reorganize normalization details UI - add new fiscal taxonomy surface/income bridge/KPI packs and update Rust taxonomy loading - auto-detect Homebrew SQLite for native `sqlite-vec` in local dev/e2e with docs and env guidance
1.7 KiB
Local sqlite-vec Setup
Local Bun runtimes on macOS use Apple’s system SQLite by default, and that build does not support loading SQLite extensions. This repo now auto-detects Homebrew SQLite for local development and e2e boot paths so native sqlite-vec can load when a compatible library is available.
Automatic local setup
The following entrypoints auto-detect Homebrew SQLite on macOS:
bun run devbun run e2e:webserverbun run e2e:prepare
If either of these files exists, local runtimes configure Bun to use it before any database connection is created:
/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib/usr/local/opt/sqlite/lib/libsqlite3.dylib
The vector extension path is resolved from the installed sqlite-vec package rather than a hardcoded repository path.
Install Homebrew SQLite
brew install sqlite
Explicit overrides
You can still override the auto-detected values explicitly:
export SQLITE_CUSTOM_LIB_PATH=/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib
export SQLITE_VEC_EXTENSION_PATH=/absolute/path/to/vec0.dylib
SQLITE_CUSTOM_LIB_PATHmust point to the SQLite dynamic library, not thesqlite3executable.SQLITE_VEC_EXTENSION_PATHmust point to the loadablesqlite-vecextension file.
Explicit env values take precedence over auto-detection.
Fallback behavior
If a compatible SQLite library is not available, the app still starts and search still works:
- FTS text search remains enabled
- vector storage falls back to the table-backed implementation
- native
sqlite-vecacceleration is simply unavailable
If explicit native paths are configured and loading still fails, startup logs keep that failure noisy so broken native configuration is visible immediately.