Installation
Python
pip install vectlite
Pre-built wheels for macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows (x86_64). Requires Python 3.9+.
Install from source
pip install git+https://github.com/mcsedition-hub/vectlite.git#subdirectory=bindings/python
Requires Rust and Cargo installed.
Optional extras
The Python package ships with no hard runtime dependencies. Install the relevant SDK only for features you use:
- LangChain integration --
pip install langchain-core - LlamaIndex integration --
pip install llama-index-core - Built-in embedders --
pip install openai/cohere/voyageai/fastembed/sentence-transformers(see the embedder factories in the Python API reference) - ONNX cross-encoder reranker --
pip install onnxruntime tokenizers huggingface-hub - Stemmer for the analyzer pipeline --
pip install PyStemmer - OpenTelemetry tracing --
pip install opentelemetry-api
Node.js
npm install vectlite
Requires Node.js 18+. Pre-built binaries for macOS (x86_64, arm64), Linux (x86_64), and Windows (x86_64). Other platforms compile from source (requires Rust/Cargo).
Optional extras
- OpenTelemetry tracing --
npm install @opentelemetry/api
Rust
Add to your Cargo.toml:
[dependencies]
vectlite-core = { git = "https://github.com/mcsedition-hub/vectlite.git" }
Swift (experimental)
Experimental bindings built on a shared UniFFI layer. Ship VectLiteFFI.xcframework (built by the bindings/swift/build-xcframework.sh script in the repo) and add the Swift package wrapper to your project.
import VectLite
let db = try VectLite.open(path: "knowledge.vdb", dimension: 384)
See the bindings/swift folder in the GitHub repository for the package manifest and the XCFramework build script.
Kotlin / JVM (experimental)
Experimental Kotlin/JVM bindings via UniFFI + JNA. Source lives in bindings/kotlin.
import org.mcsedition.vectlite.*
val db = VectLite.open("knowledge.vdb", dimension = 384)
Build the native library through the Gradle package in bindings/kotlin -- it compiles the generated UniFFI Kotlin source and loads the Rust FFI library through JNA at runtime.