main.rs 629 B

1234567891011121314151617181920212223242526
  1. // Copyright 2019-2024 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. use tauri::Manager;
  6. fn main() {
  7. let mut app = tauri::Builder::default()
  8. .build(tauri::generate_context!(
  9. "../../examples/run-iteration/tauri.conf.json"
  10. ))
  11. .expect("error while building tauri application");
  12. loop {
  13. app.run_iteration(|_app, _event| {
  14. //println!("{:?}", _event);
  15. });
  16. if app.webview_windows().is_empty() {
  17. app.cleanup_before_exit();
  18. break;
  19. }
  20. }
  21. }