tauri_plugin_process/
lib.rs

1// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2// SPDX-License-Identifier: Apache-2.0
3// SPDX-License-Identifier: MIT
4
5//! This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin.
6
7#![doc(
8    html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
9    html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
10)]
11
12use tauri::{
13    plugin::{Builder, TauriPlugin},
14    Runtime,
15};
16
17mod commands;
18
19pub fn init<R: Runtime>() -> TauriPlugin<R> {
20    Builder::new("process")
21        .invoke_handler(tauri::generate_handler![commands::exit, commands::restart])
22        .build()
23}