Tech stack
For the curious, here’s the stack behind Loach at a glance.
Stack at a glance
| Layer | Choice |
|---|---|
| Desktop shell | Tauri 2.x (Rust), currently 2.12, with tauri-plugin-single-instance so a second launch brings the running window forward |
| Frontend | React 19 + Vite 8 + TypeScript |
| Styling | Tailwind CSS 3 + shadcn/ui (Radix primitives) + tailwindcss-animate + @tailwindcss/typography |
| Icons | lucide-react |
| State | Zustand (in-memory; SQLite-backed where appropriate) |
| Storage | SQLite via rusqlite (bundled - no system dependency) |
| Library search | SQLite FTS5 keyword index + optional embeddings (Ollama or an OpenAI-compatible endpoint), merged by reciprocal-rank fusion |
| Secrets | keyring crate → Windows Credential Manager / Linux Secret Service / macOS Keychain |
| Hashing | argon2 (app-lock) |
| HTTP | reqwest with streaming + rustls-tls |
| Markdown | react-markdown + remark-gfm + rehype-highlight (highlight.js) |
| Math | remark-math + rehype-katex + KaTeX, lazy-loaded from the bundle on first use |
| Document parsing | pdfjs-dist (PDF) + mammoth (DOCX) |
| PDF generation | printpdf 0.12 with bundled Liberation Sans fonts, subset at render time (Latin-script text; other characters print as ?) |
| Built-in tools | In-process Rust: exmex (calculator), chrono-tz (time zones), sha2, similar (text diff), natord (natural sort), unicode-segmentation (grapheme counts), ipnet |
| Work in folders | walkdir + glob + regex (no backtracking); encoding_rs + chardetng to edit non-UTF-8 files in their own encoding |
| MCP | Built-in client: Streamable HTTP over reqwest, or a local stdio process - on Windows in a job object, on macOS / Linux in its own process group, so stopping a server stops everything it started |
| Hardware detection | sysinfo (RAM, free disk) + DXGI on Windows / nvidia-smi or amdgpu sysfs on Linux (VRAM), for the onboarding model recommendation |
| HTML preview | A sandboxed frame served from its own loach-sandbox scheme, with its own content security policy: offline, with no access to the app or its commands |
| Updates | Tauri updater plugin with Ed25519 (minisign) signature verification |
| System tray | Tauri 2 built-in (tray-icon feature) |
| Bundle targets | NSIS .exe on Windows; .deb / .rpm / .AppImage on Linux; .dmg + .app on macOS (Apple Silicon) |
Toolchain
Building from source needs Node.js 22.13+ (or 24 / 26+) and Rust 1.90+ - the minimum the dependency tree allows; CI and the Docker build pin Rust 1.90.0 and Node.js 22. Linux builds target glibc 2.35, so Ubuntu 22.04 and Debian 12 are the oldest supported distributions. See Build from source.