Process
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
Platform | Level | Notes |
---|---|---|
windows | ||
linux | ||
macos | ||
android | | |
ios | |
Setup
Install the plugin-process to get started.
Use your project’s package manager to add the dependency:
-
Run the following command in the
src-tauri
folder to add the plugin to the project’s dependencies inCargo.toml
: -
Modify
lib.rs
to initialize the plugin: -
If you’d like to utilize the plugin in JavaScript then install the npm package as well:
Usage
The process plugin is available in both JavaScript and Rust.
Note that app
is an instance of AppHandle
.
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.
Default Permission
This permission set configures which process feeatures are by default exposed.
Granted Permissions
This enables to quit via allow-exit
and restart via allow-restart
the application.
allow-exit
allow-restart
Permission Table
Identifier | Description |
---|---|
|
Enables the exit command without any pre-configured scope. |
|
Denies the exit command without any pre-configured scope. |
|
Enables the restart command without any pre-configured scope. |
|
Denies the restart command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT