Fall back to synchronous rendering on Wasm

This commit is contained in:
Héctor Ramón Jiménez 2025-10-24 18:14:29 +02:00
parent 47a3fc0b9a
commit 5216253998
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 25 additions and 11 deletions

View file

@ -198,10 +198,17 @@ impl<P: Program> Application<P> {
#[cfg(feature = "tester")]
let program = iced_tester::attach(self);
#[cfg(all(feature = "debug", not(feature = "tester")))]
#[cfg(all(
feature = "debug",
not(feature = "tester"),
not(target_arch = "wasm32")
))]
let program = iced_devtools::attach(self);
#[cfg(not(any(feature = "tester", feature = "debug")))]
#[cfg(not(any(
feature = "tester",
all(feature = "debug", not(target_arch = "wasm32"))
)))]
let program = self;
Ok(shell::run(program)?)