← Todos os modelos

Núcleo em Rust, permissões mínimas, pacotes pequenos, comandos tipados entre a UI e o núcleo.

Constitution — Tauri app

Version 1.0.0 · Ratified 2026-11-10

These principles hold for every spec, plan and task of the project. A spec may add rules; it never weakens these.

  1. Rust core. Business rules, file access, networking and storage live in the Rust core. The web frontend only renders and calls commands.

  2. Minimal permissions. Tauri 2 capabilities give each window only the permissions it uses, with scopes narrowed to the paths and URLs it needs. A wildcard scope for fs or shell fails the review, and a new permission needs a reason in the plan.

  3. Small bundles. The release profile uses lto, strip and opt-level = "s", and the installer stays under 15 MB. CI checks the size and fails above the budget.

  4. Typed commands between UI and core. Every #[tauri::command] takes and returns serde types and returns a Result with a serializable error. TypeScript bindings are generated (for example with tauri-specta), so a hand-written invoke string fails the review.

  5. Locked-down webview and signed updates. A strict Content Security Policy is set in tauri.conf.json and no remote content is loaded. The updater verifies every update with the app's public key, and release builds are signed.

  6. Tested and lint-clean. The core is covered by cargo test and cargo clippy -- -D warnings passes. Critical flows have WebDriver end-to-end tests, all green before the merge.