ADR-005: WebAssembly Integration for Browser and Mobile Deployment

Date: 2026-02-01 Status: Accepted

Context

QNTX has multiple Rust components integrated into a Go server via CGO. The vision includes running entirely in the browser (offline-first), on mobile, and as a Tauri desktop app — all sharing the same core logic.

Decision

All shared computation moves to Rust crates compiled to WebAssembly, running on:

Architecture

┌─────────────┐     ┌──────────────┐     ┌────────────┐
│   Browser   │     │ Tauri Desktop│     │  Go Server │
│   (web/ts)  │     │  (src-tauri) │     │  (cmd/qntx)│
└──────┬──────┘     └──────┬───────┘     └─────┬──────┘
       │                   │                    │
       └───────────────────┼────────────────────┘
                           │
                    ┌──────▼──────┐
                    │  Rust WASM  │
                    │  (shared)   │
                    └─────────────┘

Key design choices

What moves to WASM

Any logic that both browser and server need: parsing, fuzzy search, classification, sync, identity generation, expansion. See wasm-capabilities.md for the current capability matrix and migration candidates.

Consequences

Positive

Negative

Neutral

References