#sqlite #vector-store #framework #rig-sqlite

rig-sqlite

SQLite-based vector store implementation for the rig framework

10 releases

new 0.1.9 Apr 15, 2025
0.1.8 Mar 31, 2025
0.1.5 Feb 18, 2025
0.1.3 Jan 27, 2025
0.1.1 Dec 19, 2024

#1285 in Database interfaces

Download history 9/week @ 2025-01-06 122/week @ 2025-01-13 11/week @ 2025-01-20 117/week @ 2025-01-27 33/week @ 2025-02-03 129/week @ 2025-02-10 154/week @ 2025-02-17 30/week @ 2025-02-24 157/week @ 2025-03-03 18/week @ 2025-03-10 140/week @ 2025-03-17 16/week @ 2025-03-24 148/week @ 2025-03-31 20/week @ 2025-04-07

325 downloads per month

MIT license

27KB
282 lines

+ SQLite logo



Rig-SQLite

This companion crate implements a Rig vector store based on SQLite.

Usage

Add the companion crate to your Cargo.toml, along with the rig-core crate:

[dependencies]
rig-sqlite = "0.1.3"
rig-core = "0.4.0"

You can also run cargo add rig-sqlite rig-core to add the most recent versions of the dependencies to your project.

See the /examples folder for usage examples.

Important Note

Before using the SQLite vector store, you must initialize the SQLite vector extension. Add this code before creating your connection:

use rusqlite::ffi::sqlite3_auto_extension;
use sqlite_vec::sqlite3_vec_init;

unsafe {
    sqlite3_auto_extension(Some(std::mem::transmute(sqlite3_vec_init as *const ())));
}

Dependencies

~33–45MB
~723K SLoC