#sqlite #vector-store #rig #framework #companion #sq-lite-based

rig-sqlite

SQLite-based vector store implementation for the rig framework

8 releases

new 0.1.7 Mar 17, 2025
0.1.6 Mar 3, 2025
0.1.5 Feb 18, 2025
0.1.3 Jan 27, 2025
0.1.1 Dec 19, 2024

#1408 in Database interfaces

Download history 129/week @ 2024-11-29 37/week @ 2024-12-06 71/week @ 2024-12-13 85/week @ 2024-12-20 5/week @ 2025-01-03 109/week @ 2025-01-10 27/week @ 2025-01-17 105/week @ 2025-01-24 37/week @ 2025-01-31 123/week @ 2025-02-07 142/week @ 2025-02-14 49/week @ 2025-02-21 151/week @ 2025-02-28 29/week @ 2025-03-07 116/week @ 2025-03-14

358 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
~722K SLoC