2024-06-11 23:58:00 -07:00
|
|
|
# Using `sqlite-vec` in Go
|
|
|
|
|
|
2024-07-14 13:47:41 -07:00
|
|
|
There are two ways you can embed `sqlite-vec` into Go applications: a CGO option
|
|
|
|
|
for libraries like
|
|
|
|
|
[`github.com/mattn/go-sqlite3`](https://github.com/mattn/go-sqlite3), or a
|
|
|
|
|
WASM-based option with
|
|
|
|
|
[`github.com/ncruces/go-sqlite3`](https://github.com/ncruces/go-sqlite3).
|
|
|
|
|
|
|
|
|
|
## Option 1: CGO
|
|
|
|
|
|
2024-06-11 23:58:00 -07:00
|
|
|
```bash
|
|
|
|
|
go get -u github.com/asg017/sqlite-vec/bindings/go/cgo
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-14 13:47:41 -07:00
|
|
|
## Option 2: WASM based with `ncruces/go-sqlite3`
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
go
|
|
|
|
|
```
|
|
|
|
|
|
2024-06-11 23:58:00 -07:00
|
|
|
## Working with vectors in Go
|