▸ Agent Skills
1 min read

Persisted Scope

GitHubcrates.io

API Reference:

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

[TABLE]

Setup

Install the persisted-scope plugin to get started.

Use your project’s package manager to add the dependency:

npm run tauri add persisted-scope
yarn run tauri add persisted-scope
pnpm tauri add persisted-scope
deno task tauri add persisted-scope
bun tauri add persisted-scope
cargo tauri add persisted-scope
  1. Run the following command in the src-tauri folder to add the plugin to the project’s dependencies in Cargo.toml:

    cargo add tauri-plugin-persisted-scope
  2. Modify lib.rs to initialize the plugin:

    #[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");}

    src-tauri/src/lib.rs

Usage

After setup the plugin will automatically save and restore filesystem and asset scopes.


Support on Open CollectiveSponsor on GitHub

© 2026 Tauri Contributors. CC-BY / MIT


Last updated Oct 08, 2026