From 65369f53cb1f55de8eb1dab9bf33d07b10e96845 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 20 Jun 2026 14:27:51 +0300 Subject: [PATCH] fix(web): gate boot() to native so the wasm build compiles The clap CLI work made boot() read crate::cli, but cli is cfg'd out on wasm (the web build takes no args), so the wasm target failed to compile. boot() is only used by the native iced::daemon run(); the web build boots via boot_web(). Gate boot() with cfg(not(wasm32)) to match. Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 24048110d..4c27919ed 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1811,7 +1811,9 @@ impl OpenCADStudio { } /// Boot function for `iced::daemon`: returns initial state plus a task that - /// opens the primary application window. + /// opens the primary application window. Native only — the web build uses + /// [`Self::boot_web`]. + #[cfg(not(target_arch = "wasm32"))] fn boot() -> (Self, Task) { use helpers::build_window_icon; // Silently (re)register this binary as a .dwg/.dxf handler so it appears