From 183fb8a659c22b134606d262a53d331ff62f41a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 9 Apr 2025 23:03:01 +0200 Subject: [PATCH] Avoid attaching `devtools` on Wasm --- src/application.rs | 4 ++-- src/daemon.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/application.rs b/src/application.rs index f2ed2d4d..09dd2647 100644 --- a/src/application.rs +++ b/src/application.rs @@ -169,10 +169,10 @@ impl Application

{ where Self: 'static, { - #[cfg(feature = "debug")] + #[cfg(all(feature = "debug", not(target_arch = "wasm32")))] let program = iced_devtools::attach(self.raw); - #[cfg(not(feature = "debug"))] + #[cfg(any(not(feature = "debug"), target_arch = "wasm32"))] let program = self.raw; Ok(shell::run(program, self.settings, Some(self.window))?) diff --git a/src/daemon.rs b/src/daemon.rs index 08a8cf59..8a356356 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -117,10 +117,10 @@ impl Daemon

{ where Self: 'static, { - #[cfg(feature = "debug")] + #[cfg(all(feature = "debug", not(target_arch = "wasm32")))] let program = iced_devtools::attach(self.raw); - #[cfg(not(feature = "debug"))] + #[cfg(any(not(feature = "debug"), target_arch = "wasm32"))] let program = self.raw; Ok(shell::run(program, self.settings, None)?)