▸ Agent Skills
2 min read

Process

GitHubnpmcrates.io

API Reference:

This plugin provides APIs to access the current process. To spawn child processes, see the shell plugin.

Supported Platforms

This plugin requires a Rust version of at least 1.77.2

[TABLE]

Setup

Install the plugin-process to get started.

Use your project’s package manager to add the dependency:

npm run tauri add process
yarn run tauri add process
pnpm tauri add process
deno task tauri add process
bun tauri add process
cargo tauri add process
  1. Run the following command in the src-tauri folder to add the plugin to the project’s dependencies in Cargo.toml:

    cargo add tauri-plugin-process
  2. Modify lib.rs to initialize the plugin:

    #[cfg_attr(mobile, tauri::mobile_entry_point)]pub fn run() {    tauri::Builder::default()        .plugin(tauri_plugin_process::init())        .run(tauri::generate_context!())        .expect("error while running tauri application");}

    src-tauri/src/lib.rs

  3. If you’d like to utilize the plugin in JavaScript then install the npm package as well:

    npm install @tauri-apps/plugin-process
    yarn add @tauri-apps/plugin-process
    pnpm add @tauri-apps/plugin-process
    deno add npm:@tauri-apps/plugin-process
    bun add @tauri-apps/plugin-process

Usage

The process plugin is available in both JavaScript and Rust.

import { exit, relaunch } from '@tauri-apps/plugin-process';// when using `"withGlobalTauri": true`, you may use// const { exit, relaunch } = window.__TAURI__.process;
// exits the app with the given status codeawait exit(0);
// restarts the appawait relaunch();

Note that app is an instance of AppHandle.

// exits the app with the given status codeapp.exit(0);
// restarts the appapp.restart();

Permissions

By default all potentially dangerous plugin commands and scopes are blocked and cannot be accessed. You must modify the permissions in your capabilities configuration to enable these.

See the Capabilities Overview for more information and the step by step guide to use plugin permissions.

{  "permissions": [    ...,    "process:default",  ]}

src-tauri/capabilities/default.json

Default Permission

This permission set configures which process features are by default exposed.

Granted Permissions

This enables to quit via allow-exit and restart via allow-restart the application.

This default permission set includes the following:

  • allow-exit
  • allow-restart

Permission Table

IdentifierDescription
process:allow-exitEnables the exit command without any pre-configured scope.
process:deny-exitDenies the exit command without any pre-configured scope.
process:allow-restartEnables the restart command without any pre-configured scope.
process:deny-restartDenies the restart command without any pre-configured scope.

Support on Open CollectiveSponsor on GitHub

© 2026 Tauri Contributors. CC-BY / MIT


Last updated Oct 08, 2026