Skip to content

Commit

Permalink
fix ncruces build
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Oct 11, 2024
1 parent b582f1d commit ad3b18e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bindings/go/ncruces/go-sqlite3.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/embed/build.sh b/embed/build.sh
index 6141efd..d24f460 100755
index ed2aaec..4cc0b0e 100755
--- a/embed/build.sh
+++ b/embed/build.sh
@@ -23,6 +23,7 @@ trap 'rm -f sqlite3.tmp' EXIT
Expand All @@ -8,22 +8,22 @@ index 6141efd..d24f460 100755
-DSQLITE_CUSTOM_INCLUDE=sqlite_opt.h \
+ -DSQLITE_VEC_OMIT_FS=1 \
$(awk '{print "-Wl,--export="$0}' exports.txt)

"$BINARYEN/wasm-ctor-eval" -g -c _initialize sqlite3.wasm -o sqlite3.tmp
diff --git a/sqlite3/main.c b/sqlite3/main.c
index 50f10db..824246a 100644
index c732937..7c9002a 100644
--- a/sqlite3/main.c
+++ b/sqlite3/main.c
@@ -18,6 +18,7 @@
@@ -19,6 +19,7 @@
#include "time.c"
#include "vfs.c"
#include "vtab.c"
+#include "../../sqlite-vec.c"

__attribute__((constructor)) void init() {
sqlite3_initialize();
@@ -28,4 +29,5 @@ __attribute__((constructor)) void init() {
sqlite3_auto_extension((void (*)(void))sqlite3_series_init);
@@ -30,4 +31,5 @@ __attribute__((constructor)) void init() {
sqlite3_auto_extension((void (*)(void))sqlite3_spellfix_init);
sqlite3_auto_extension((void (*)(void))sqlite3_uint_init);
sqlite3_auto_extension((void (*)(void))sqlite3_time_init);
+ sqlite3_auto_extension((void (*)(void))sqlite3_vec_init);
Expand Down

0 comments on commit ad3b18e

Please sign in to comment.