跳转到内容
Tauri

进程

这个插件提供了访问当前进程的 API。要生成子进程,请参阅 shell 插件。

设置

从安装 plugin-process 开始使用。

使用项目的包管理器来添加依赖:

npm run tauri add process

用法

这个插件有 JavaScript 和 Rust 两种版本。

import { exit, relaunch } from '@tauri-apps/plugin-process';
// exits the app with the given status code
await exit(0);
// restarts the app
await relaunch();

© 2024 Tauri Contributors. CC-BY / MIT