You could split it up in two separate entities. For vector search there's a myriad of good Rust projects. I've personally used:

- https://crates.io/crates/lancedb - https://crates.io/crates/usearch - https://crates.io/crates/simsimd

search and simsimd are fast and lightweight, but I'd advise to use lancedb if you're a bit new to Rust as the other two are a bit trickier to handle due to the C dependency (e.g. usearch needs Vec::with_capacity and will otherwise crash, etc).

And then, you take the result of this query and can combine it with a sqlite `in` query.

Or you use SQLite with a vector search extension: https://crates.io/crates/rig-sqlite