Initial commit

This commit is contained in:
Alex Garcia 2024-04-20 13:38:58 -07:00
commit 4c8ad629e0
28 changed files with 6758 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# `sqlite-vec` statically compiled in the SQLite CLI
You can compile your own version of the `sqlite3` CLI with `sqlite-vec` builtin. The process is not well documented, but the special `SQLITE_EXTRA_INIT` compile option can be used to "inject" code at initialization time. See the `Makefile` at the root of this project for some more info.
The `core_init.c` file here demonstrates auto-loading the `sqlite-vec` entrypoints at startup.

View file

@ -0,0 +1,8 @@
#include "sqlite3.h"
#include "sqlite-vec.h"
#include <stdio.h>
int core_init(const char *dummy) {
int rc = sqlite3_auto_extension((void *)sqlite3_vec_init);
if(rc != SQLITE_OK) return rc;
return sqlite3_auto_extension((void *)sqlite3_vec_fs_read_init);
}