Shell
Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application.
Supported Platforms
- Windows
- Linux
- macOS
Setup
This plugin requires a Rust version of at least 1.75
Install the shell plugin 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: -
Install the JavaScript Guest bindings using your preferred JavaScript package manager:
Usage
The shell plugin is available in both JavaScript and Rust.
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 shell functionality is exposed by default.
Granted Permissions
It allows to use the open
functionality without any specific
scope pre-configured. It will allow opening http(s)://
,
tel:
and mailto:
links.
allow-open
Permission Table
Identifier | Description |
---|---|
|
Enables the execute command without any pre-configured scope. |
|
Denies the execute command without any pre-configured scope. |
|
Enables the kill command without any pre-configured scope. |
|
Denies the kill command without any pre-configured scope. |
|
Enables the open command without any pre-configured scope. |
|
Denies the open command without any pre-configured scope. |
|
Enables the spawn command without any pre-configured scope. |
|
Denies the spawn command without any pre-configured scope. |
|
Enables the stdin_write command without any pre-configured scope. |
|
Denies the stdin_write command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT