Persisted Scope
Save filesystem and asset scopes and restore them when the app is reopened.
Supported Platforms
This plugin requires a Rust version of at least 1.77.2
| Platform | Level | Notes |
|---|---|---|
| windows | ||
| linux | ||
| macos | ||
| android | ||
| ios |
Setup
Install the persisted-scope plugin to get started.
Use your project’s package manager to add the dependency:
npm run tauri add persisted-scopeyarn run tauri add persisted-scopepnpm tauri add persisted-scopedeno task tauri add persisted-scopebun tauri add persisted-scopecargo tauri add persisted-scope-
Run the following command in the
src-taurifolder to add the plugin to the project’s dependencies inCargo.toml:cargo add tauri-plugin-persisted-scope -
Modify
lib.rsto initialize the plugin:src-tauri/src/lib.rs #[cfg_attr(mobile, tauri::mobile_entry_point)]pub fn run() {tauri::Builder::default().plugin(tauri_plugin_persisted_scope::init()).run(tauri::generate_context!()).expect("error while running tauri application");}
Usage
After setup the plugin will automatically save and restore filesystem and asset scopes.
© 2025 Tauri Contributors. CC-BY / MIT