Files
ARCADIA-Studio/crates/oa-desktop/src/main.rs
T

71 lines
1.8 KiB
Rust

#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
mod allocation_drag;
mod allocation_input;
mod app;
mod behavior;
mod connection_edit;
mod connection_tool;
mod context_menu;
mod data_values;
mod data_view;
mod diagnostic_input;
mod diagram;
mod diagram_selection;
mod diagram_usage;
mod document;
mod explorer;
mod explorer_view;
mod focus_optical;
mod forms;
mod guide;
mod highlight;
mod home;
mod hosted;
mod model_menu;
mod navigation;
mod port_edit;
mod port_preview;
mod port_workflow;
mod recovery;
mod route_edit;
mod semantic_review;
mod source_annotations;
mod source_indentation;
mod source_navigation;
mod source_rename;
mod source_tree;
mod source_workspace;
mod style;
#[cfg(test)]
mod tests;
mod view_copy;
mod views;
mod workflow;
fn main() -> iced::Result {
// Small headless entry points support reproducible examples and CI validation.
let args: Vec<_> = std::env::args().collect();
if focus_optical::requested(&args) {
return focus_optical::run(&args[2..]);
}
if args.get(1).is_some_and(|s| s == "--write-example") {
let path = args
.get(2)
.expect("usage: arcadia-studio --write-example PATH");
oa_core::persistence::save(std::path::Path::new(path), &oa_core::Project::demo())
.expect("write example");
return Ok(());
}
iced::application(app::App::new, app::App::update, app::App::view)
.title(app::App::title)
.theme(|_: &app::App| style::theme())
.subscription(app::App::subscription)
.window(iced::window::Settings {
size: iced::Size::new(1440., 900.),
min_size: Some(iced::Size::new(1100., 700.)),
exit_on_close_request: false,
..Default::default()
})
.run()
}