use eframe::egui; fn main() -> Result<(), eframe::Error> { let options = eframe::NativeOptions { viewport: egui::ViewportBuilder::default().with_inner_size([320.0, 240.0]), ..Default::default() }; eframe::run_native( "Hello World", options, Box::new(|_cc| Ok(Box::new(MyApp::default()))), ) } struct MyApp; impl Default for MyApp { fn default() -> Self { Self } } impl eframe::App for MyApp { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { egui::CentralPanel::default().show(ctx, |ui| { ui.heading("Hello World!"); ui.label("This is a simple egui application."); }); } }