mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Vendor the spellfix1 extension source and compile it directly into the binary via cgo, avoiding runtime shared library dependencies across platforms. The extension is registered via sqlite3_auto_extension so every new SQLite connection has spellfix1 available. Signed-off-by: Deluan <deluan@navidrome.org>
1.0 KiB
1.0 KiB
spellfix1 SQLite Extension
This package statically compiles the spellfix1 SQLite extension
into the Navidrome binary. It is registered via sqlite3_auto_extension so that every new SQLite
connection has spellfix1 available without loading a shared library.
Vendored Files
The C source files are vendored because cgo cannot reference headers from other Go modules:
spellfix.c— from the SQLite source tree:ext/misc/spellfix.csqlite3ext.h— from the SQLite source tree:src/sqlite3ext.h
Updating
When upgrading github.com/mattn/go-sqlite3, run the update script to download
the matching spellfix1 source files for the bundled SQLite version:
./db/spellfix/update.sh
The script reads the SQLite version from go-sqlite3's sqlite3-binding.h and
downloads the corresponding files from the SQLite GitHub mirror.