0001 — Shell: Tauri 2, not Electron

Status: Accepted · 2026-08-20

Context

The drawing engine is a browser library: pdf.js for rasterisation, canvas and SVG for markup, real DOM for the panels. So the shell's job is to host a webview and own everything a webview must not own — the filesystem, the project database, native dialogs, the update channel.

Two shells could do that. The product has to run on Windows, macOS and mobile, because a superintendent reviews drawings on a tablet on site and that is not a secondary use case.

Decision

Tauri 2.

  1. Mobile. Tauri 2 targets iOS and Android from the same codebase. Electron does not target mobile at all. On its own this decides it: half the product's platforms are unreachable otherwise.
  2. The native side wants to be Rust. The document domain, the invariants, the local store, the hostile-input bounds and the audit chain are all things better written in a language that makes their failure modes hard to reach. Electron's native side is Node, which is a fine language and the wrong one for this particular set of jobs.
  3. The security boundary is declarative. Tauri's capability files enumerate what the renderer may reach, in about a minute of reading. Electron's equivalent is a set of webPreferences plus IPC-handler discipline that has to be re-verified by reading code.
  4. Size. Roughly 10 MB against roughly 120 MB, which matters to a subcontractor on a site connection.

What it costs

What would reverse it

Reversing would mean dropping mobile or maintaining two shells. The bar is high on purpose.