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;