Most open-source AI desktop apps follow a frustrating pattern: to run local RAG on your markdown notes, they instruct you to spin up a Docker container with PostgreSQL + pgvector, run a Python FastAPI background server, or sign up for a cloud vector database with an API key.
When we designed Knovum — a local-first desktop AI workspace built with Tauri 2, Rust, and Vue 3 (now 100% MIT licensed) — we set a strict requirement: zero Docker, zero background daemon surprises, zero cloud subscription, and zero open localhost ports.
Here is how we architected embedded LanceDB + SQLite in Tauri 2 to deliver instant semantic search and spatial knowledge graphs on macOS and Windows.
1. The Dual-Storage Architecture: Transactional vs. Vector
A common mistake in RAG applications is using a vector database as the primary source of truth. Vector databases excel at approximate nearest neighbor (ANN) search, but they struggle with strict relational integrity, ACID transactions, and complex graph joins.
We split storage responsibilities cleanly:
┌────────────────────────────────────────────────────────┐ │ Vue 3 Canvas UI │ └───────────────────────────┬────────────────────────────┘ │ Tauri IPC (Zero-Copy) ┌───────────────────────────▼────────────────────────────┐ │ Rust Engine (Tauri 2) │ │ ┌───────────────────────┐ ┌───────────────────────┐ │ │ │ SQLite v1 Baseline │ │ Embedded LanceDB │ │ │ │ (Notes, Graph, Claims)│ │ (Arrow-based Vectors) │ │ │ └───────────────────────┘ └───────────────────────┘ │ └────────────────────────────────────────────────────────┘ -
SQLite (WAL mode) owns all structured entities:
- Concepts, Claims, Evidence, Decisions, and Experiments
- Graph edges with 10 semantic relationship types (supports, refutes, depends_on, etc.)
- Full migration history with schema locks
-
LanceDB (Apache Arrow) owns vector embeddings:
- Zero-copy reads directly from disk via disk-backed IVF-PQ indexing
- Fast cosine similarity search across hundreds of thousands of note chunks
- No separate server process; linked directly as a compiled Rust crate
2. Eliminating the "Citation Drift" Problem
In traditional RAG chat interfaces, an LLM quotes a note snippet, but after you edit the note, the quotation remains static. Soon, the user's workspace is cluttered with outdated, hallucinated quotes.
In Knovum, we implemented Mutation-Aware Provenance:
- Every embedded chunk has a rolling 48-character structural anchor and SHA-256 fingerprint in SQLite.
- When an excerpt is placed on the 2D canvas, the Rust engine monitors file mutations.
- If the source document changes, the canvas card automatically flags the citation as
[Detached], prompting a one-click re-index.
3. Tauri 2 + Rust vs. Electron: The Memory Budget
Why not just wrap LanceDB in an Electron app with Node.js bindings?
Because local AI has a strict physical ceiling: System RAM and VRAM.
If the desktop shell consumes 900MB of RAM (standard for Chromium + Node.js runtimes), that is 900MB subtracted from what a 7B or 8B quantized model (e.g., Llama 3.2 or Qwen 2.5) requires to run locally at 35 tok/sec.
With Tauri 2:
- Binary size: ~22MB
- Idle memory footprint: ~40MB
- Heavy operations (Whisper speech decoding, LanceDB vector indexing) run natively on background worker threads without stuttering the 60fps Vue 3 canvas.
4. 100% MIT Licensed
We recently relicensed the entire Knovum repository to 100% MIT License.
If you are exploring local AI, building Tauri 2 apps, or tired of cloud subscription bloat, check out the source code, play with the canvas, or contribute upstream:
⭐️ GitHub Repository: https://github.com/madebyzan/knovum
We'd love your architectural feedback and PRs!
