When to use this skill
ALWAYS use this skill when the user mentions:
- Lightweight persistent storage / 轻量持久化存储
- Store vs LazyStore decision / Store 与 LazyStore 选择
- Saving app settings to disk / 应用配置落盘保存
Trigger phrases include:
- "store", "lazystore", "persistence", "key-value"
- "Persistence", "local storage", "config saving", "key-value"
How to use this skill
- Decide between Store and LazyStore based on load timing
- Define the storage file location and schema
- Restrict access via capabilities and scope
- Validate persistence lifecycle and error handling
Outputs
- Store selection guidance / Store 选择指导
- Persistence plan for app settings / 应用配置持久化方案
Scope
- Boundary: Store plugin usage only
- Key points: Store vs LazyStore differences
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/plugin/store/
- https://v2.tauri.app/zh-cn/plugin/store/
Keywords
tauri store, key-value, persistence, local storage
Common Gotchas (Gotchas)
- Version compatibility: Pay attention to compatibility between framework versions and dependency libraries; APIs may differ across versions
- Config file format: Config file format errors are the most common issue; it is recommended to use the editor's syntax checking
- Environment variables: Ensure all necessary environment variables are set correctly; do not hardcode sensitive information
- Dependency conflicts: When multiple versions coexist, watch out for dependency conflicts; use a lock file to pin versions
- Performance pitfalls: In large data volume scenarios, pay attention to performance optimization and avoid common issues such as N+1 queries
Usage workflow
Step 1: Environment preparation
Ensure the development environment has the necessary dependencies and tools installed.
Step 2: Configuration initialization
Perform basic configuration according to project requirements.
Step 3: Core functionality usage
Implement the core functionality according to the example code.
Step 4: Testing and verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and release
After completing development, proceed with deployment and monitoring.