Repository navigation
feat(sqlite): enable FTS5 and add a per-target shim build script - #53
Merged
Merged
Conversation
Deploying cutilsjs with
|
| Latest commit: |
57e6cec
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a5cc3805.cutilsjs.pages.dev |
| Branch Preview URL: | https://feat-sqlite-fts5-per-target.cutilsjs.pages.dev |
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
build/libsqlite3-shim.ais built on Linux, soscriptc build --ffi node_modules/@cutils/sqlite/ffi.jsonfails to link on macOS (ELF archive) and cannot cross-compile to Windows or other arches.CREATE VIRTUAL TABLE ... USING fts5fail at runtime.Fix
-DSQLITE_ENABLE_FTS5in every build/test command.scripts/build-shim.mjs --out <dir> [--target triple] [--cc] [--ar]builds the shim archive for one target and writes a matchingffi.jsonwhoselibrariespoints at it. It ships in the tarball. Works withccon the host andCC="zig cc" AR="zig ar"for cross targets.Verification
build-shim.mjsemitting archive and manifest.node --test test/*14/14 pass (shared lib built with-dynamiclib;build:sharedstill uses-Bsymbolic, Linux only), scriptc coverage gate 100%.CC="zig cc" AR="zig ar" ... --target x86_64-windows-gnuproduces a COFF archive.pnpm teston Linux CI, ELF smoke on Linux.