Persist key-value data to disk using the Tauri v2 store plugin for app settings and preferences. Use when saving app configuration, choosing between Store and LazyStore, or implementing persistent settings with automatic disk writes.
ALWAYS use this skill when the user mentions:
Trigger phrases include:
cargo add tauri-plugin-store
tauri::Builder::default()
.plugin(tauri_plugin_store::Builder::new().build())
src-tauri/capabilities/default.json{ "permissions": ["store:allow-get", "store:allow-set", "store:allow-save", "store:allow-load"] }
import { Store } from '@tauri-apps/plugin-store';
const store = await Store.load('settings.json');
await store.set('theme', 'dark');
await store.set('language', 'en');
const theme = await store.get<string>('theme');
await store.save(); // persist to disk
Store for settings loaded at startup; use LazyStore for data loaded on-demandsave() callstauri store, key-value, persistence, app settings, preferences, local storage