From 42f5a618097ff509be007242af0e33360273424b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 12 Mar 2025 16:51:45 +0100 Subject: [PATCH] Disable `debug` view on Wasm (for now) --- debug/Cargo.toml | 1 + debug/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debug/Cargo.toml b/debug/Cargo.toml index 0cf8d7af..574cc11a 100644 --- a/debug/Cargo.toml +++ b/debug/Cargo.toml @@ -16,5 +16,6 @@ enable = ["dep:iced_beacon"] [dependencies] iced_core.workspace = true +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] iced_beacon.workspace = true iced_beacon.optional = true diff --git a/debug/src/lib.rs b/debug/src/lib.rs index 3adf251f..a7d9b037 100644 --- a/debug/src/lib.rs +++ b/debug/src/lib.rs @@ -61,7 +61,7 @@ pub fn skip_next_timing() { internal::skip_next_timing(); } -#[cfg(feature = "enable")] +#[cfg(all(feature = "enable", not(target_arch = "wasm32")))] mod internal { use crate::core::theme; use crate::core::time::Instant; @@ -204,7 +204,7 @@ mod internal { static SKIP_NEXT_SPAN: AtomicBool = AtomicBool::new(false); } -#[cfg(not(feature = "enable"))] +#[cfg(any(not(feature = "enable"), target_arch = "wasm32"))] mod internal { use crate::core::theme; use crate::core::window;