# 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 **build-time dev dependency** — 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: | # | Requirement | Why / what happens otherwise | |---|---|---| | 1 | **Tauri 2** | A 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. | | 2 | **Built from source, plugin wired in** | One 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. | | 3 | **Debug build** | The server is `#[cfg(debug_assertions)]`-gated; `init()` is a no-op and nothing listens in release. A dev/test-time tool by design. | | 4 | **Per-window `victauri:default` capability** | Tauri'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 and cross-checked. | ✅ Works on | ❌ Won't work on | |---|---| | Your own Tauri 2 app during development | Tauri 1.x apps (wrong major) | | Any Tauri 2 app you can build from source in debug | Release / production builds (gated to no-op) | | Any frontend framework, any of the three OSes | A binary you didn't build (no source to add a dev dep) | | | Non-Tauri apps — Electron, native, plain web | > Tauri-1 example: the `surrealist`/`lettura` entries pinned in the compat harness are Tauri **1.4** at those refs and therefore cannot host Victauri — a reminder to target Tauri-2 refs/apps, not a Victauri defect. ## 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: | Platform | Native API | CSP bypass | |---|---|---| | Windows | `ICoreWebView2.ExecuteScriptAsync()` | Yes (Chromium CDP `allowUnsafeEvalBlockedByCSP` defaults to true) | | macOS | `WKWebView.evaluateJavaScript()` | Yes (privileged bridge execution) | | Linux | `webkit_web_view_run_javascript()` | Yes ([WebKitGTK docs confirm explicit bypass](https://webkitgtk.org/reference/webkit2gtk/stable/property.WebView.default-content-security-policy.html)) | 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](https://github.com/tauri-apps/tauri/issues/13577)). The Victauri bridge will be absent inside any `