2022-06-03 02:03:37 +02:00
|
|
|
mod app;
|
2022-06-05 20:05:39 +02:00
|
|
|
mod util;
|
2022-06-03 02:03:37 +02:00
|
|
|
|
|
|
|
use app::App;
|
|
|
|
|
2022-06-05 20:05:39 +02:00
|
|
|
use crate::util::worker::{BackgroundWorker, NativeBackgroundWorker};
|
|
|
|
|
2022-06-03 02:03:37 +02:00
|
|
|
// When compiling natively:
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
|
|
fn main() {
|
|
|
|
let native_options = eframe::NativeOptions::default();
|
|
|
|
|
2022-06-05 20:05:39 +02:00
|
|
|
let worker = NativeBackgroundWorker::start();
|
|
|
|
|
|
|
|
eframe::run_native( // TODO replace this with a loop that ends so we can cleanly exit the background worker
|
2022-06-03 02:03:37 +02:00
|
|
|
"2b2t queue stats",
|
|
|
|
native_options,
|
|
|
|
Box::new(|cc| Box::new(App::new(cc))),
|
|
|
|
);
|
2022-06-05 20:05:39 +02:00
|
|
|
|
|
|
|
// worker.stop();
|
2022-06-03 02:03:37 +02:00
|
|
|
}
|