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

Architecture

Overview

┌─────────────────────────────────────────────────────────┐
│                   recall.app (Tauri 2)                   │
│                                                         │
│  ┌───────────────────┐      ┌────────────────────────┐  │
│  │  React frontend   │ IPC  │  Rust backend          │  │
│  │  (Vite + TS)      │◄────►│  (src-tauri/src/lib.rs)│  │
│  └───────────────────┘      └──────────┬─────────────┘  │
│                                        │                 │
│                              ┌─────────▼──────────┐      │
│                              │   recall-core       │      │
│                              │  ┌────────────────┐ │      │
│                              │  │  db (rusqlite) │ │      │
│                              │  ├────────────────┤ │      │
│                              │  │  embedder      │ │      │
│                              │  │  (fastembed)   │ │      │
│                              │  ├────────────────┤ │      │
│                              │  │  search        │ │      │
│                              │  │  (cosine sim)  │ │      │
│                              │  ├────────────────┤ │      │
│                              │  │  history       │ │      │
│                              │  │  (zsh/bash)    │ │      │
│                              │  └────────────────┘ │      │
│                              └─────────────────────┘      │
└─────────────────────────────────────────────────────────┘

┌────────────────────────────────────────┐
│  recall CLI (cmdcpy binary)            │
│  ~/.local/bin/recall                   │
│  → loads recall-core, queries same DB  │
└────────────────────────────────────────┘

Crate Layout

CratePathPurpose
recall-corerecall-core/Shared library: DB, embedder, search, history
recall (lib)src-tauri/Tauri app backend — exposes IPC commands
recall (bin)cmdcpy/CLI binary installed to ~/.local/bin/recall

AI Model

Uses fastembed-rs with AllMiniLML6V2 (384-dimensional embeddings). Model files are cached in ~/.cache/fastembed/ after the one-time ~120 MB download.

Embeddings are stored as raw f32 LE bytes in the embeddings.vector BLOB. Search is linear cosine similarity scan — fast for typical library sizes (<10k commands).

IPC

Frontend calls Rust via @tauri-apps/api/core invoke(). All commands are registered in tauri::generate_handler![]. Payloads serialize with serde_json.

State

AppState holds:

  • conn: Mutex<Connection> — single SQLite connection (serialized writes)
  • embedder: Arc<Mutex<Option<Embedder>>>None while model is loading; set from background thread