main.rs 499 B

1234567891011121314151617
  1. // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
  5. #[tauri::command]
  6. fn app_should_close(exit_code: i32) {
  7. std::process::exit(exit_code);
  8. }
  9. fn main() {
  10. tauri::Builder::default()
  11. .invoke_handler(tauri::generate_handler![app_should_close])
  12. .run(tauri::generate_context!())
  13. .expect("error while running tauri application");
  14. }