mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Start work on server
This commit is contained in:
+15
-14
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user