Bundling sqlite-vec into a go-sqlite3 build #121
Replies: 2 comments 5 replies
-
Converted to a discussion, as although it's not “actionable” (not a task) this is exactly the kind of thing I want to keep open and visible. |
Beta Was this translation helpful? Give feedback.
-
This is looking great, and is pretty much exactly how I'd approach it. If it becomes more official, I'd probably create an I'm curious about I managed to avoid the main SQLite Wasm needing WASI, but this is probably something that can be made configurable. |
Beta Was this translation helpful? Give feedback.
-
Hey Nuno! Just wanted to share something I was able to make: a WASM build of SQLite, built for
go-sqlite3
, withsqlite-vec
builtin: https://github.com/asg017/sqlite-vec/releases/download/v0.0.1-alpha.27/sqlite-vec-0.0.1-alpha.27-ncruces-go.wasmI have a demo here of how it works, using the
sqlite3.Binary
trick. And the makefile, that just downloads the WASM file.To build it it's a bit complicated, but it works. I just
git clone
this repo and add this patch file: https://github.com/asg017/sqlite-vec/blob/main/bindings/go/ncruces/go-sqlite3.patchThen I build the project, all on github actions: https://github.com/asg017/sqlite-vec/blob/main/.github/workflows/release.yaml#L211-L238
And it works well! You can ignore the "database is locked" error, that's a sqlite-vec bug I'll fix:
Just wanted to share to see what you think! I don't mind the build steps, but if you have an tips would love to hear it!
(Feel free to close whenever you like)
Beta Was this translation helpful? Give feedback.
All reactions