2 releases
new 0.1.1 | Apr 18, 2025 |
---|---|
0.1.0 | Apr 18, 2025 |
#820 in Database interfaces
72KB
1.5K
SLoC
High-level abstractions for project contexts & database access for Tauri applications.
Primary features:
- Database creation & management with PoloDB
- Management of open file handles
- Basic filesystem operations within the context
- Automatic prevention of context escapes
tauri-plugin-persistence
A wrapper plugin for several persistence backends, focused on managing complex project folders with less boilerplate.
Installation
# Install cargo dependency
cargo add tauri-plugin-persistence
# Install JS dependency
npm install tauri-plugin-persistence-api
Setup
The plugin must be initialized in Rust. A basic example follows:
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_persistence::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Usage
The plugin's functions can be accessed in Rust from app.persistence()
, or in the frontend (see the example).
Dependencies
~43–80MB
~1.5M SLoC