perilus

RISC-V processor built with Chisel
git clone https://git.bradleygannon.com/perilus.git
Log | Files | Refs | Submodules | README

main.rs (871B)


      1 mod app;
      2 mod state;
      3 mod ui;
      4 
      5 use std::path::PathBuf;
      6 
      7 use app::{FONT_SIZE, SimApp};
      8 
      9 fn main() -> eframe::Result {
     10     let file = std::env::args_os().nth(1).map(PathBuf::from);
     11     let options = eframe::NativeOptions {
     12         viewport: eframe::egui::ViewportBuilder::default()
     13             .with_inner_size([1420.0, 900.0])
     14             .with_min_inner_size([900.0, 480.0])
     15             .with_title("perilus"),
     16         ..Default::default()
     17     };
     18     eframe::run_native(
     19         "perilus",
     20         options,
     21         Box::new(move |cc| {
     22             cc.egui_ctx.all_styles_mut(|style| {
     23                 style.override_font_id = Some(eframe::egui::FontId::monospace(FONT_SIZE));
     24             });
     25             let mut app = SimApp::new();
     26             if let Some(file) = file {
     27                 app.load_path(file);
     28             }
     29             Ok(Box::new(app))
     30         }),
     31     )
     32 }