Mountain/IPC/WindServiceHandlers/NativeHost/Quit.rs
1
2//! `nativeHost:quit` - save state and gracefully exit the process.
3//! VS Code calls this from `ILifecycleMainService.quit()` on Cmd+Q,
4//! File → Quit, and the "Quit" tray item.
5
6use serde_json::Value;
7use tauri::AppHandle;
8
9use crate::dev_log;
10
11pub async fn Fn(ApplicationHandle:AppHandle, _Arguments:Vec<Value>) -> Result<Value, String> {
12 dev_log!("lifecycle", "nativeHost:quit - exiting cleanly");
13
14 ApplicationHandle.exit(0);
15
16 Ok(Value::Null)
17}