mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-20 09:11:55 +03:00
ec9818accb
* refactor(core): App::run_iteration improvements * lint * fixes * fix exit * Apply suggestions from code review Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de> * update cargo.toml * booooool * fix mock runtime * fix doctests * fix doctest againrrrr --------- Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
27 lines
629 B
Rust
27 lines
629 B
Rust
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
use tauri::Manager;
|
|
|
|
fn main() {
|
|
let mut app = tauri::Builder::default()
|
|
.build(tauri::generate_context!(
|
|
"../../examples/run-iteration/tauri.conf.json"
|
|
))
|
|
.expect("error while building tauri application");
|
|
|
|
loop {
|
|
app.run_iteration(|_app, _event| {
|
|
//println!("{:?}", _event);
|
|
});
|
|
|
|
if app.webview_windows().is_empty() {
|
|
app.cleanup_before_exit();
|
|
break;
|
|
}
|
|
}
|
|
}
|