1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: MIT
3
4#![cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))]
5
6use crate::app_main::AppHandler;
7
8pub mod ui {
9 slint::include_modules!();
10}
11
12mod app_main;
13mod weather;
14
15fn main() -> Result<(), slint::PlatformError> {
16 env_logger&mut Builder::Builder::default()
17 .filter_level(if cfg!(debug_assertions) {
18 log::LevelFilter::Debug
19 } else {
20 log::LevelFilter::Info
21 })
22 .init();
23
24 let mut app_handler: AppHandler = AppHandler::new();
25 app_handler.initialize_ui();
26
27 let res: Result<(), PlatformError> = app_handler.run();
28 app_handler.save();
29 res
30}
31