CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

tauri-apps/tauri

Scanned commit 745b9a48ae dated 2026-09-22 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/tauri-apps/tauri ↗ · 1083 files · 6.6 MB

Introduction Tauri is a framework for building tiny, blazingly fast binaries for all major operating systems.

Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded) — every claim below links to its cited source files.

Overview

Tauri v2 is a Rust monorepo containing the full toolchain for building desktop and mobile applications that pair a system webview frontend (any HTML/JS/CSS framework) with a Rust backend: the `tauri` core runtime crate, compile-time codegen/macros that embed config, assets and ACLs, a `cargo-tauri` CLI (also shipped as `@tauri-apps/cli` via napi), a bundler producing OS installers, the `@tauri-apps/api` TypeScript package, and a WebDriver intermediary (`tauri-driver`) for e2e testing. Its distinctive traits are compile-time embedding of `tauri.conf.json`, frontend assets and capability-based ACLs into the binary, a capability/permission system that gates every IPC command, and reliance on the OS webview (via the TAO/WRY crates) instead of a bundled runtime.

System map

The repo is a Cargo workspace plus a pnpm workspace. The hub is crates/tauri (the `tauri` crate, v2.11.5), which depends on tauri-runtime (trait layer), tauri-runtime-wry (default WRY/TAO-based runtime), tauri-utils (config/ACL/assets), tauri-codegen + tauri-macros (compile-time codegen) and tauri-build (build-script API). Tooling lives in crates/tauri-cli (the `cargo-tauri` binary), crates/tauri-bundler (installer packaging), crates/tauri-driver (WebDriver proxy), and packages/api + packages/cli (the npm-facing JS). Mobile (Android/iOS) support is split between CLI subcommands and Kotlin/Swift glue under crates/tauri/mobile.

All 13 system map claims →

Feature catalog

User-facing surface has three layers: the Rust API (Builder, windows, webviews, menus, tray, events, state, plugins, custom protocols), the JS API (invoke, Channel, events, window/webview/menu/tray/path/image modules), and the `cargo-tauri` CLI covering the whole project lifecycle (init, dev with hot-reload, build, bundle, icon, signer, plugin scaffolding, ACL permission/capability helpers, migrate, inspect, info). Bundling supports all major OS installer formats, and the repo ships example apps plus a WebDriver driver for automation.

All 14 feature catalog claims →

Data flow

Configuration flows from tauri.conf.json (json/json5/toml, plus platform-specific overlay files) through tauri-build/tauri-codegen into a compiled `Context` carrying embedded assets, CSP hashes and resolved ACLs. At runtime the `AppManager` owns config, assets, plugins, state, listeners and the `RuntimeAuthority`; webview requests travel over postMessage or the `ipc://` custom protocol, get parsed into `InvokeRequest`s, authorized against the ACL and origin, then dispatched to plugin handlers or the app's `invoke_handler`, with responses returned via JS eval or a Channel. File access flows through the `asset:` protocol gated by FsScope, and dev-mode traffic can be proxied through the custom protocol on mobile.

Behavior traces

Three flows were traced end-to-end. (1) App startup: user main → Builder → build(Context) → runtime event loop → Ready → setup hook → windows/webviews created. (2) IPC invoke: JS invoke() → injected ipc.js → postMessage or ipc:// POST → parse → invoke_key check → ACL resolve → plugin or app handler → eval/Channel response. (3) CLI dev: cargo-tauri → Commands::Dev → config load → beforeDevCommand spawn → dev-server wait → cargo run under a file watcher that rebuilds on change.

All 13 behavior traces claims →

Testing signals

Testing is layered: inline Rust unit tests behind `#[cfg(test)]` in core modules, a mock runtime (`tauri::test`, `test` feature) enabling headless App tests, insta snapshot tests for ACL resolution in crates/tests/acl, a real-binary CLI integration test, WebdriverIO e2e specs in packages/api-e2e that run against examples/api via tauri-driver, vitest tests for the JS CLI package, and bench apps for CI benchmarking. Coverage is strongest around ACL/config parsing and IPC request parsing; the wry runtime and bundler are largely exercised only through e2e and examples.

Risk map

The highest-stakes code is the IPC authorization boundary: invoke_key verification, ACL resolution, remote-origin rejection, and eval-based response delivery all sit on the webview↔Rust seam. The `asset:` protocol touches the filesystem and relies entirely on scope checks. The CLI executes config-supplied shell commands and writes a predictable-path kill script. Several cross-language invariants (serialization key names, `plugin:` command syntax, JNI symbol names, JS template placeholders) are maintained only by comments, and the workspace release profile aborts on panic.

All 13 risk map claims →

Extension points

Tauri is designed for extension at several layers: Rust commands registered through `generate_handler!`/`#[command]`, full plugins implementing the `Plugin` trait (with the companion `tauri-plugin` build crate emitting permissions, global API scripts and mobile glue), custom URI scheme protocols, Builder lifecycle hooks (setup, page-load, menu/tray/window/webview events, channel interceptor), custom `Assets` providers, a swappable `Runtime` trait, capability/permission JSON+TOML files composing ACLs, `State` injection for shared data, and JS-side extension via `Channel`, `Resource` and the `__TAURI_TO_IPC_KEY__` serialization hook.

Contributor handoff

Start with ARCHITECTURE.md, then crates/tauri/src/lib.rs for the module map and feature flags. Most edits land in crates/tauri/src (runtime), crates/tauri-utils (config/ACL schema), crates/tauri-cli/src (commands), or packages/api/src (JS API). Respect the cfg matrix (desktop/mobile/dev custom cfgs), keep cross-language constants in sync, add a .changes changefile for any user-visible change, and regenerate committed artifacts before pushing. Test with cargo test per-crate plus pnpm-level JS checks; e2e needs the examples/api app and tauri-driver.

Languages

LanguageFilesShare of source
Rust32358%
Markdown197docs/config
JSON86docs/config
TOML6411%
TypeScript468%
Kotlin438%
JavaScript387%
YAML33docs/config

Start reading here

Probable source entrypoint: Cargo.toml — inferred from the directory tree and manifest, not the upstream docs.

Source roots

crates/ (641 files) packages/ (93 files)

Source layout — crates/

PathFiles
crates/tauri/158
crates/tauri-build/13
crates/tauri-codegen/9
crates/tauri-driver/10
crates/tauri-plugin/4
crates/tauri-runtime/12
crates/tauri-runtime-wry/21
crates/tauri-schema-worker/8
crates/tests/4

Repository structure

Top-level pathFiles
crates/641
examples/136
.changes/114
packages/93
.github/34
bench/26
.docker/10
.scripts/6

Docs found: ARCHITECTURE.mdREADME.md

Package

Cargo.toml — , 0 declared dependencies.

CI & config entrypoints

Structural health signals

Average score 6.3/10 across 96 analyzed source files; 55 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history