Skip to content

feat(sqlite-vec): vector search#285

Open
riteshshukla04 wants to merge 1 commit into
margelo:mainfrom
riteshshukla04:feat/sqlite-vec-search
Open

feat(sqlite-vec): vector search#285
riteshshukla04 wants to merge 1 commit into
margelo:mainfrom
riteshshukla04:feat/sqlite-vec-search

Conversation

@riteshshukla04

Copy link
Copy Markdown
Contributor

No description provided.

Add react-native-nitro-sqlite-vec: a companion package vendoring the
sqlite-vec v0.1.9 amalgamation. Its native sources compile INTO the core
react-native-nitro-sqlite library's single sqlite3 build and register via
sqlite3_auto_extension — no second sqlite3, no runtime extension loading.
Vector search runs through the core's existing execute() API (vec0 +
vec_* functions); thin typed helpers (vecVersion/createVectorTable/
knnSearch) are included.

Core integration:
- Android: CMakeLists/build.gradle flag-gated compilation of the
  companion's sqlite-vec.c (-DSQLITE_CORE -DSQLITE_VEC_STATIC), enabled
  in the example via gradle.properties `nitroSqliteVec=true`.
- iOS: companion RNNitroSqliteVec.podspec, static-linked into the core's
  single sqlite3 through the core podspec.
- operations.cpp registers the extension once in sqliteOpenDb
  (#ifdef NITRO_SQLITE_VEC); bindStatement binds whole-number JS values
  as INTEGER (vec0 rowid/pk/partition require INTEGER); sqliteExecuteBatch
  fixes a double-rollback that masked the real batch error.

Testing: on-device React Native Harness spec
(example/tests/harness/sqlite-vec.harness.ts) covering vec_* scalar
functions, distance metrics, vec0 KNN (float32/int8/bit), metadata
filtering, partition keys, auxiliary columns, and UPDATE/DELETE.
@riteshshukla04 riteshshukla04 changed the title feat(sqlite-vec): vector search via statically-linked sqlite-vec feat(sqlite-vec): vector search Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant