tauri-plugin-configurate into your project takes four steps: add the Rust crate, add the JavaScript package, register the plugin in your Tauri builder, and grant the required IPC permissions. The optional fifth step covers advanced plugin configuration through the builder API.
rustup update stable if you need to upgrade.If you prefer to track the latest unreleased commits directly from the repository, use the Git source instead:
# src-tauri/Cargo.toml
[dependencies]
tauri-plugin-configurate = { git = "https://github.com/Crysta1221/tauri-plugin-configurate" }
You can skip the two separate install commands above by running
tauri add configurate from your project root. The Tauri CLI installs both the Rust crate and the npm package for you in one step.// src-tauri/src/lib.rs
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_configurate::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Tauri’s capability system gates every IPC call. Open (or create)
src-tauri/capabilities/default.json and add the plugin’s default permission set:The Omitting this permission causes keyring unlock calls to fail at runtime with an IPC authorization error.
configurate:allow-unlock permission is not included in configurate:default. If you use .unlock() or loadAll().unlock() to retrieve secrets from the OS keyring, you must grant it explicitly:The default plugin limits config file reads and import content to 16 MiB. You can raise or lower this limit using either the Rust builder or
tauri.conf.json. When both are set, tauri.conf.json takes precedence.// src-tauri/src/lib.rs
fn main() {
tauri::Builder::default()
.plugin(
tauri_plugin_configurate::Builder::default()
.max_read_bytes(32 * 1024 * 1024) // 32 MiB
.build(),
)
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
What’s Next
With the plugin installed and permissions granted, you’re ready to define your first config schema and start reading and writing settings.Quickstart
Define a schema, create a config file, and load it back in a few lines of TypeScript.
Providers
Learn the differences between JSON, YAML, TOML, and encrypted Binary providers and when to use each.