Skip to main content
Getting 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.
1
Check Prerequisites
2
Before you install, make sure your environment meets the minimum requirements:
3
  • Rust ≥ 1.85.0 — the plugin uses language features that require this minimum toolchain version. Run rustup update stable if you need to upgrade.
  • An existing Tauri v2 project — the plugin targets Tauri v2 only and is not compatible with Tauri v1.
  • 4
    Add the Rust Crate
    5
    Open src-tauri/Cargo.toml and add tauri-plugin-configurate under [dependencies]:
    6
    # src-tauri/Cargo.toml
    [dependencies]
    tauri-plugin-configurate = "0.5.0"
    
    7
    If you prefer to track the latest unreleased commits directly from the repository, use the Git source instead:
    8
    # src-tauri/Cargo.toml
    [dependencies]
    tauri-plugin-configurate = { git = "https://github.com/Crysta1221/tauri-plugin-configurate" }
    
    9
    Install the JavaScript Package
    10
    Install the guest bindings with your preferred package manager:
    11
    pnpm
    pnpm add tauri-plugin-configurate-api
    
    npm
    npm add tauri-plugin-configurate-api
    
    yarn
    yarn add tauri-plugin-configurate-api
    
    bun
    bun add tauri-plugin-configurate-api
    
    12
    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.
    13
    Register the Plugin
    14
    In src-tauri/src/lib.rs, call tauri_plugin_configurate::init() inside your Tauri builder chain:
    15
    // 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");
    }
    
    16
    Grant Permissions
    17
    Tauri’s capability system gates every IPC call. Open (or create) src-tauri/capabilities/default.json and add the plugin’s default permission set:
    18
    {
      "permissions": ["configurate:default"]
    }
    
    19
    The 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:
    {
      "permissions": [
        "configurate:default",
        "configurate:allow-unlock"
      ]
    }
    
    Omitting this permission causes keyring unlock calls to fail at runtime with an IPC authorization error.
    20
    (Optional) Advanced Builder Configuration
    21
    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.
    22
    Rust (src-tauri/src/lib.rs):
    23
    // 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");
    }
    
    24
    tauri.conf.json:
    25
    {
      "plugins": {
        "configurate": {
          "maxReadBytes": 33554432
        }
      }
    }
    

    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.