Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tauri App Compatibility

Victauri works with any Tauri 2.x application. This page documents compatibility considerations discovered through research against real-world open-source Tauri apps and platform-level investigation.

Will Victauri work on your app?

Victauri is a development-time dependency (a normal [dependencies] entry — the app binary cannot use [dev-dependencies]) — you add it to your app’s source and rebuild. It is not an attach-to-anything tool: there is no way to point it at an already-running, shipped, or third-party binary you didn’t build. It works when all four conditions hold:

#RequirementWhy / what happens otherwise
1Tauri 2A Tauri 1.x app’s webkit2gtk-sys 0.18 and Victauri’s 2.x both link the native web_kit2 library — cargo cannot link two packages to the same native lib, so the plugin won’t compile in. Hard, per-app-unfixable.
2Built from source, plugin wired inOne line in Cargo.toml (victauri-plugin), .plugin(victauri_plugin::init()) on the builder, and a victauri:default capability. No inject-into-a-foreign-binary path exists.
3Debug buildThe server is #[cfg(debug_assertions)]-gated; init() is a no-op and nothing listens in release. A dev/test-time tool by design.
4Per-window victauri:default capabilityTauri’s per-window permission ACL silently blocks the bridge’s callback IPC without it — the window comes up blind (introspectable:false). The window introspectability tool detects this and names the exact fix. This is the #1 adoption footgun.

Not constraints: the frontend framework (React 18/19, Vue/Nuxt, Svelte, vanilla) and the OS/webview engine (WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux) are all supported. The bridge works at DOM level, so no framework is special-cased; see what was actually run.

✅ Works on❌ Won’t work on
Your own Tauri 2 app during developmentTauri 1.x apps (wrong major)
Any Tauri 2 app you can build from source in debugRelease / production builds (gated to no-op)
Any frontend framework, any of the three OSesA binary you didn’t build (no source to add a dev dep)
Non-Tauri apps — Electron, native, plain web

Check the Tauri major of the exact ref you build: Lettura’s newest release tag (v0.1.22) is still Tauri 1, which cannot host Victauri, so scripts/compat/apps.json pins a Tauri-2 commit from its master instead.

Content Security Policy (CSP)

Short answer: CSP does not block Victauri on any platform.

Victauri’s JS bridge is injected via Tauri’s js_init_script() API, and all tool calls use Tauri’s webview.eval() which delegates to native platform APIs:

PlatformNative APICSP bypass
WindowsICoreWebView2.ExecuteScriptAsync()Yes (Chromium CDP allowUnsafeEvalBlockedByCSP defaults to true)
macOSWKWebView.evaluateJavaScript()Yes (privileged bridge execution)
Linuxwebkit_web_view_run_javascript()Yes (WebKitGTK docs confirm explicit bypass)

The bridge code itself never uses eval(), new Function(), setTimeout(string), or any other CSP-sensitive pattern. All JavaScript is direct DOM API calls and function closures.

Why this works: Native webview eval is a host-application privilege, not a page-level script execution. It operates outside the web security model, similar to how browser DevTools can evaluate code regardless of CSP.

Even apps with strict CSP like "script-src 'self'" (Spacedrive) should work with Victauri. Use get_diagnostics to verify.

Known Edge Cases

Shadow DOM (closed mode)

Victauri traverses open shadow roots automatically (element.shadowRoot returns the shadow tree). However, closed shadow roots ({ mode: "closed" }) return null — their contents are invisible to dom_snapshot, find_elements, and audit_accessibility.

Affected components: Shoelace, some Ionic components. Lit and Stencil default to open mode.

Detection: get_diagnostics reports custom elements that may have closed shadow roots.

Workaround: None possible — this is a browser security boundary. If you control the component, switch to mode: "open" in debug builds.

iframes

Tauri’s js_init_script does not run inside iframes (tauri-apps/tauri#13577). The Victauri bridge runs only in the main frame, and what it reaches depends on the frame’s origin:

  • Same-origin frames are traversed from the main frame: dom_snapshot, find_elements, interact and input see and act on their contents.
  • Cross-origin frames are marked in the snapshot and skipped. The browser’s security boundary leaves no way in.
  • In either kind, a frame’s own console output and its IPC and network calls are not captured, because no bridge runs there.

Detection: get_diagnostics reports iframe count and sources.

Workaround for cross-origin content: None — Tauri recommends using multi-webview (WebviewWindow) instead of iframes for security.

Service Workers

Service workers can intercept fetch() calls, including the IPC calls (http://ipc.localhost/ on WebView2, ipc://localhost/ on WebKit) Victauri uses to capture IPC traffic. An active service worker may cause:

  • Missing entries in get_ipc_log
  • False negatives in detect_ghost_commands and check_ipc_integrity

Additionally, tauri-apps/tauri#12673 documents that service workers break invoke() and emit() on second app launch.

Detection: get_diagnostics warns when navigator.serviceWorker.controller is active.

Risk level: Low — service workers require https:// or http://localhost origin, so they only affect apps using tauri-plugin-localhost. Most Tauri apps use the tauri:// protocol which doesn’t support service workers.

Tauri’s postMessage IPC fallback (and Android)

When one custom-protocol IPC fetch() fails — a blocked scheme, a CSP connect-src that does not allow ipc: / http://ipc.localhost, a service worker — Tauri logs IPC custom protocol failed, Tauri will now use the postMessage interface instead and sends every later IPC call of that page over window.ipc.postMessage. On Android it always uses postMessage.

Victauri captures that path too (command, args, status, duration, response body; entries tagged transport: "post_message") — see Architecture. Calls captured this way are not replayed by recording replay.

Detection: get_diagnostics reports info.ipc_capture and warns ipc-postmessage-fallback (severity low when capture is still full, high when only requests, or nothing, can be seen). The IPC-derived reports (detect_ghost_commands, check_ipc_integrity, introspect coverage / command_catalog / command_timings) carry the same ipc_capture object.

Fix the cause, not the symptom: on desktop the fallback almost always means something is breaking the custom protocol. Check the app’s CSP and service worker; Tauri’s own IPC is faster over the custom protocol.

Alternative IPC Transports

rspc / tauri-specta

Apps like Spacedrive route all RPC through a single Tauri command (e.g., daemon_request). Victauri’s IPC log will show the wrapper command but not the inner procedure names. get_registry returns empty unless commands are also registered with #[inspectable].

tauri-invoke-http

tauri-invoke-http replaces Tauri’s IPC transport entirely with a localhost HTTP server, bypassing ipc.localhost. Victauri’s IPC interception will miss all calls. This plugin is very niche.

Sidecar processes

Apps using Node.js sidecars (Yaak) or daemon processes (Spacedrive) for backend logic — Victauri only sees the Tauri IPC boundary. Sidecar/gRPC traffic is invisible.

Large DOM

Victauri walks the entire DOM tree for dom_snapshot. Performance scales linearly:

ElementsApproximate time
1,000~10ms
5,000~50ms
10,000~100ms
50,000~500ms

Apps using virtualized lists (react-window, tanstack-virtual) only render visible items, so the actual DOM count is smaller than the data set.

Detection: get_diagnostics warns when DOM exceeds 5,000 elements.

Plugin Port Conflicts

tauri-plugin-localhost also binds a localhost HTTP server. Victauri’s port fallback (7373 → 7374 → … → 7383 → an OS-assigned port) and automatic port file discovery handle this. No action needed.

Custom Invoke Handlers

Tauri 2 supports only one invoke_handler per app (tauri-apps/tauri#11447). Victauri intercepts IPC via fetch monitoring, not by wrapping the invoke handler, so custom handlers do not affect Victauri.

Platform-Specific Notes

PlatformRequirementNotes
WindowsWebView2 runtimePre-installed on Windows 11; auto-installed on Windows 10. Evergreen (auto-updates).
macOSmacOS 10.15+WKWebView ships with the OS. No additional runtime.
LinuxWebKitGTK 2.36+ (webkit2gtk-4.1)Ubuntu 22.04+. Tauri 2 won’t compile on older versions, so not a Victauri concern.

Linux: keep Tauri handles on the main thread

On Linux every Tauri handle (AppHandle, Window, Webview, WebviewWindow) carries tao’s main-thread-only state, including a non-atomic Rc, behind an unsafe impl Send + Sync. Cloning or dropping any handle on another thread races that refcount, and the app can later abort with glibc corrupted double-linked list / unaligned fastbin chunk on whichever thread allocates next. This is a Tauri/tao behavior, not something Victauri adds. Victauri itself only clones and drops handles on the main thread since 0.9.0, but an app’s own code can still hit the race, and when it does the crash can look like it came from whatever happened to be running at the time, Victauri included.

The usual culprit is moving an AppHandle into std::thread::spawn or tauri::async_runtime::spawn to emit from background work: the handle is dropped on that thread when the work ends. Instead, take one handle on the main thread and let background work borrow it (emit only needs &self):

#![allow(unused)]
fn main() {
use std::sync::OnceLock;
use tauri::Emitter;

static APP: OnceLock<tauri::AppHandle> = OnceLock::new();

// in .setup(|app| { ... }) — runs on the main thread
let _ = APP.set(app.handle().clone());

// in background work: borrow, never clone or own
if let Some(app) = APP.get() {
    let _ = app.emit("job-complete", 42);
}
}

Victauri’s own example apps (examples/demo-app, examples/gauntlet-app) use this pattern. Async #[tauri::command]s are a separate, upstream case: Tauri extracts their arguments and drops their resolver on a tokio worker, whatever the command body does.

A command that opens a window must not be sync

A sync #[tauri::command] runs on the main thread inside the webview’s IPC handler. Building a webview there deadlocks on Windows: the window never appears, and the calling page stays wedged until the app restarts, so every Victauri call to that window then times out. Make the command async, and to keep the Linux rule above, hand the build to the main thread (show_notification_window in examples/demo-app/src/main.rs does this).

Tauri Version Compatibility

Victauri’s CI builds and runs it on Tauri 2.12 (the workspace lockfile) and on Tauri 3.0.0-alpha.5 (the tauri3 canary job); it compiles against Tauri 2.0.0 and 2.12 (checked in the 0.10.0 pre-audit). The tauri-v3 feature needs Tauri 3.0.0-alpha.4 or newer (its permission build step is tauri-plugin 3.0.0-alpha.4, which requires a matching tauri-utils). Key compatibility facts:

  • js_init_script() API is stable across all 2.x releases
  • Tauri 2’s IPC runs over a custom-protocol fetch() (http://ipc.localhost, https://ipc.localhost for apps with useHttpsScheme, ipc://localhost on macOS/Linux) with a window.ipc.postMessage fallback; the bridge captures both (verified against Tauri 2.11 and 2.12’s ipc-protocol.js / core.js). On the postMessage path, responses are captured through Tauri’s __TAURI_INTERNALS__.callbacks table, which Tauri added in 2.6: on Tauri 2.0–2.5 only the requests are captured there (ipc_capture.capture: "requests_only", outcomes logged as unknown). The fetch path is captured fully on every 2.x.
  • Plugin init scripts run in IIFE isolation since April 2024 — no global scope conflicts
  • The plugin:victauri| namespace prefix is automatically excluded from IPC logs

Tauri 3 (pre-release)

victauri-plugin builds against the Tauri 3 pre-releases (currently 3.0.0-alpha.5) with its tauri-v3 feature; see the plugin README for the dependency lines. One crate serves both majors: its tauri requirement spans 2.x and the tested 3.x pre-releases, and because tauri declares links = "Tauri" cargo resolves it onto the app’s own Tauri. The tauri3 CI job builds the demo app against Tauri 3 (examples/tauri3, its own workspace — Tauri 2 and 3 cannot share a lockfile) on Linux, macOS and Windows and drives it live.

What Tauri 3 changed that touches a plugin like Victauri, so far:

  • plugin::Builder::js_init_script is now initialization_script (same main-frame semantics) — the one source difference, behind tauri-v3.
  • run_on_main_thread moved from the handle types to the Manager trait; Victauri already calls it with Manager in scope, so the same code compiles on both majors. It still borrows the handle (no off-main-thread clone), so the main-thread rules above hold unchanged.
  • Plugin hooks (on_event, …) must be Fn + Send + Sync and may run concurrently — Victauri’s are stateless.
  • The webview runtime is chosen by the app (Builder::runtime(tauri_runtime_wry::Wry::default())), not by a tauri feature; AppHandle defaults to the type-erased DynRuntime. Victauri is generic over R: Runtime and needs no runtime feature.
  • The plugin permission build step writes the autogenerated command permissions to OUT_DIR (handled by the build script).
  • Unchanged and verified live on Windows/WebView2: window.__TAURI_INTERNALS__.invoke, the fetch() → http://ipc.localhost/<command> IPC transport, raw-window-handle 0.6 handles.
  • Not yet in Tauri 3: the GTK4 / WebKitGTK 6 migration (tauri#14684) — the wry runtime is still GTK 3 / webkit2gtk-4.1, so Victauri’s Linux X11 screenshot path is unchanged for now. The new CEF runtime (tauri-runtime-cef) uses GTK 4 on Linux and serves custom schemes as http://<scheme>.localhost on every platform, which matches the IPC prefix Victauri already recognises; it has not been verified live yet.

Diagnostics Tool

Call get_diagnostics (MCP or REST) to check for all known edge cases at runtime:

victauri call get_diagnostics

Returns:

{
  "warnings": [
    {
      "id": "closed-shadow-dom",
      "severity": "medium",
      "message": "3 custom element(s) may use closed shadow DOM",
      "details": { "count": 3 }
    }
  ],
  "info": {
    "bridge_version": "0.10.4",
    "dom_elements": 847,
    "open_shadow_roots": 12,
    "event_listeners": 234,
    "protocol": "tauri:",
    "url": "tauri://localhost/",
    "user_agent": "..."
  }
}

Over REST the same object sits under result, and the request needs the auth token.

Warning IDs: service-worker-active, closed-shadow-dom, iframes-present, large-dom, ipc-postmessage-fallback.

Multi-Window Apps

Victauri handles multi-window apps automatically. Default window selection: "main" → first visible → any. Use webview_label to target specific windows:

#![allow(unused)]
fn main() {
// Introspect a specific window by label:
client.dom_snapshot_for("notification").await?;

// `eval_js` targets the default window; to eval against a specific window,
// call the tool with a `webview_label` field (e.g. over the REST API):
// POST /api/tools/eval_js  {"code": "document.title", "webview_label": "settings"}
}

Apps with many dynamic windows (Spacedrive’s 15+ types, Seelen-UI’s desktop environment) should target windows by label explicitly.

Reproducible Retest Harness

To keep compatibility claims honest against the current Victauri, the repo ships a reproducible harness:

scripts/compat/retest-app.sh kanri      # one app
scripts/compat/retest-all.sh            # all three, with a results table

For each app it clones a pinned release tag, injects the current victauri-plugin (path dependency + .plugin(victauri_plugin::init()) + a victauri:default capability for all windows), builds the frontend and a debug Tauri binary, launches it headless, and runs an app-agnostic smoke battery (webview eval, DOM refs, native memory, window list, a11y/perf audits, storage round-trip — 15 checks, validated 15/15 against the demo-app). The Compatibility Retest GitHub workflow (.github/workflows/compat.yml) runs it on demand and weekly. See scripts/compat/README.md.

Note: these third-party apps move fast — pinned tags and per-app build recipes (two package managers; pnpm-version-sensitive workspaces) are maintained in scripts/compat/apps.json. A frontend-stage failure is the app’s own toolchain, not Victauri; the clone → inject → build → smoke pipeline is what proves compatibility.

Apps Victauri has actually run on

  • In the retest harness (weekly and on demand; not a release gate): Kanri (Nuxt / Vue 3), En Croissant (React), Lettura (React).
  • One-time evaluation, May 2026: those three plus Surrealist (React 19) and Duckling (React 19).
  • In this repo’s CI: the demo app and the gauntlet app (plain HTML/JS), on Windows, macOS and Linux.
  • Its maintainer’s own app: 4DA (React).

Researched fit

None of these has been run with Victauri. The table comes from reading each project’s source and says how well it should fit.

AppStarsTauriFrontendWindowsCommandsVictauri Fit
Vibe6.1k2.xTypeScript141Excellent
Bokuchi682.xReact115Excellent
Yaak18.6k2.11React 191~30-60Good (gRPC sidecar invisible)
Whispering4.5k2.xSvelte 51~10-20Good (framework diversity)
Wealthfolio7.4k2.10React1StandardGood (single-instance plugin)
Clash Nyanpasu13k2.4React 19DynamicStandardGood (dynamic windows, specta IPC)
Spacedrive38k2.1React + rspc15+rspc-routedPartial (rspc opaque, multi-window)
Seelen-UI16.8k2.10Svelte 5ManyStandardHard (desktop environment)
Hoppscotch Agent79k2.9Minimal12Too minimal

Framework Coverage

Victauri’s DOM snapshot uses the accessible tree (ARIA roles and names), which is framework-agnostic. Run against:

  • React 18 and 19 (4DA, En Croissant, Lettura, Surrealist, Duckling)
  • Vue 3 / Nuxt (Kanri)
  • Vanilla HTML/JS (demo app, gauntlet app)

Svelte has not been run. Nothing in the bridge depends on the framework, so it should work, but that is reasoning and not a test.