Dev News Daily ENDE

Tauri 2.12 can confine navigation to app-bound domains and relocate app data

Tauri 2.12.0, the framework for building desktop and mobile apps with a web front end and a Rust back end, was released on 26 September alongside a third 3.0 alpha. The stable release adds a set of controls that matter for how an app behaves once it is on a user's machine.

Two stand out. A new limit_navigations_to_app_bound_domains option, available on the webview builders and as limitNavigationsToAppBoundDomains in tauri.config.json, restricts navigation to the app's bound domains. And a new app > appDirectoriesOverride setting overrides the directories returned by the app_*_dir path APIs, either with one root or per directory, so an app can keep all its data - including Tauri's own and that of plugins using those APIs - in a place of its choosing, such as next to the executable for a portable build. It can also be set at runtime.

The release exposes wry's permission handler through Tauri, so an app can answer webview permission requests - screen capture, MIDI, sensors, file-system access, autoplay and others - with PermissionResponse::Allow, Deny or Default. JavaScript gains an exit function in @tauri-apps/api/app, backed by a new core:app:allow-exit permission, so exiting no longer requires the process plugin. There is also convert_file_src in Rust, fullscreen on a chosen monitor, Windows icon-resource loading and new macOS window effects.

One change needs action on Android: the Gradle scripts moved from the deprecated kotlinOptions DSL to compilerOptions, which lets projects use Kotlin 2.x but raises the minimum Gradle version to 8.13. The notes say projects on older Gradle should delete the generated wrapper properties and rerun tauri android init.

Tauri 2.12 can confine navigation to app-bound domains and relocate app data
Tauri 2.12 can confine navigation to app-bound domains and relocate app data — Dev News Daily

What it means

Most of 2.12 is about narrowing what an app does by default and making the remaining capabilities explicit. Limiting navigation keeps a webview from wandering to content it was never meant to show, and a permission handler in Rust replaces whatever the platform webview would have decided on its own. Both follow Tauri's model of capabilities that must be granted rather than assumed.

The data-directory override answers a long-standing request from people shipping portable apps. The Gradle bump is the one item that can break a build, and the fix is documented in the notes.

Primary source
tauri-apps/tauri - release tauri-v2.12.0
https://github.com/tauri-apps/tauri/releases/tag/tauri-v2.12.0