Files
OneCAD-Draft/src/main.rs
T
Michael Flynn e46701456f Add plugin host architecture and Storm Sewer add-on package
Generic plugin runtime (src/plugin/, HostSession, per-tab plugin_state, command router). QGIS-style add-on layout with plugin.toml and single PluginRegistration. Storm Sewer refactored as reference consumer with dispatch.rs, catchments, LandXML, headless tests (43 passing). Core update.rs decoupled from storm_sewer via CadCommand object-pick hooks. Docs: plugin-architecture.md, plugin-template, PR and issue-78 reply drafts.
2026-06-09 13:41:21 -04:00

32 lines
1021 B
Rust

#![allow(non_snake_case)]
// On Windows release builds, hide the console window the OS would
// otherwise spawn alongside the GUI. Debug builds keep stdout/stderr
// attached so eprintln! / panics stay visible while developing.
#![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")]
mod app;
mod command;
mod entities;
mod io;
mod linetypes;
mod modules;
mod plugin;
mod patterns;
mod scene;
mod snap;
mod ui;
mod update_check;
fn main() -> iced::Result {
// On some Windows hybrid-GPU laptops the AMD OpenGL driver (atio6axx.dll)
// access-violates the moment wgpu enumerates its GL backend at startup,
// killing the app before any window appears — even though DX12 would work
// fine (#55). Restrict wgpu to DX12/Vulkan so the GL ICD is never touched.
// An explicit user-set WGPU_BACKEND still wins.
#[cfg(target_os = "windows")]
if std::env::var_os("WGPU_BACKEND").is_none() {
std::env::set_var("WGPU_BACKEND", "dx12,vulkan");
}
app::run()
}