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

Development

Prerequisites

  • Rust (stable)
  • Node.js 20+
  • pnpm
  • Platform-specific dependencies (see below)

Linux

sudo apt-get install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

macOS

Xcode Command Line Tools:

xcode-select --install

Windows

Visual Studio Build Tools with C++ workload.

Running Locally

# Install frontend dependencies
pnpm install

# Start development mode
pnpm tauri dev

Building

# Development build
pnpm tauri build --debug

# Release build
pnpm tauri build

GPU Acceleration

# NVIDIA (CUDA)
cd src-tauri && cargo build --release --features "cuda flash-attn cudnn"

# Apple Silicon (Metal)
cd src-tauri && cargo build --release --features metal

Testing

Backend (Rust)

cd src-tauri && cargo test

Frontend (Svelte)

pnpm test        # Watch mode
pnpm test:run    # Single run (CI)

Project Structure

insight/
├── src/                 # Svelte frontend
├── src-tauri/          # Tauri + Rust backend
│   └── src/
│       ├── commands/   # Tauri commands (IPC)
│       └── ...
├── crates/
│   └── insight-core/   # Core library
└── docs/               # This documentation

Understanding Dependencies

Prefer local tools over web searches:

# Generate and browse docs for exact dependency versions
cargo doc --open

# View dependency graph
cargo tree

# Source code at
~/.cargo/registry/src/