Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Add Laurus to Your Project

Add laurus and tokio (async runtime) to your Cargo.toml:

[dependencies]
laurus = "0.1.0"
tokio = { version = "1", features = ["full"] }

Feature Flags

Laurus ships with a minimal default feature set. Enable additional features as needed:

FeatureDescriptionUse Case
(default)Core library (lexical search, storage, analyzers — no embedding)Keyword search only
embeddings-candleLocal BERT embeddings via Hugging Face CandleVector search without external API
embeddings-openaiOpenAI API embeddings (text-embedding-3-small, etc.)Cloud-based vector search
embeddings-multimodalCLIP embeddings for text + image via CandleMultimodal (text-to-image) search
embeddings-allAll embedding features aboveFull embedding support

Examples

Lexical search only (no embeddings needed):

[dependencies]
laurus = "0.1.0"

Vector search with local model (no API key required):

[dependencies]
laurus = { version = "0.1.0", features = ["embeddings-candle"] }

Vector search with OpenAI:

[dependencies]
laurus = { version = "0.1.0", features = ["embeddings-openai"] }

Everything:

[dependencies]
laurus = { version = "0.1.0", features = ["embeddings-all"] }

Verify Installation

Create a minimal program to verify that Laurus compiles:

use laurus::Result;

#[tokio::main]
async fn main() -> Result<()> {
    println!("Laurus version: {}", laurus::VERSION);
    Ok(())
}
cargo run

If you see the version printed, you are ready to proceed to the Quick Start.