Start work on server

This commit is contained in:
Michael Mikovsky
2025-11-28 18:39:14 -07:00
parent 598068d3ee
commit fcb8c6f6f5
13 changed files with 1800 additions and 613 deletions
+15 -14
View File
@@ -1,24 +1,23 @@
#![warn(clippy::all, rust_2018_idioms)]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
use unshell_gui::app::TemplateApp;
// When compiling natively:
#[cfg(not(target_arch = "wasm32"))]
fn main() -> eframe::Result {
pretty_env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
// pretty_env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
let native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
.with_inner_size([400.0, 300.0])
.with_min_inner_size([300.0, 220.0]),
..Default::default()
};
eframe::run_native(
"eframe template",
native_options,
Box::new(|cc| Ok(Box::new(TemplateApp::new(cc)))),
)
// let native_options = eframe::NativeOptions {
// viewport: egui::ViewportBuilder::default()
// .with_inner_size([400.0, 300.0])
// .with_min_inner_size([300.0, 220.0]),
// ..Default::default()
// };
// eframe::run_native(
// "eframe template",
// native_options,
// Box::new(|cc| Ok(Box::new(TemplateApp::new(cc)))),
// )
todo!()
}
// When compiling to web using trunk:
@@ -26,6 +25,8 @@ fn main() -> eframe::Result {
fn main() {
use eframe::wasm_bindgen::JsCast as _;
use unshell_gui::app::TemplateApp;
// Redirect `log` message to `console.log` and friends:
eframe::WebLogger::init(log::LevelFilter::Debug).ok();