Fix block_on in iced_wgpu hanging Wasm builds

This commit is contained in:
Héctor Ramón Jiménez 2024-03-07 23:25:24 +01:00
parent 1bb5a1b9a2
commit ecf42b97df
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
8 changed files with 53 additions and 30 deletions

View file

@ -97,7 +97,7 @@ where
/// Runs an [`Application`] with an executor, compositor, and the provided
/// settings.
pub fn run<A, E, C>(
pub async fn run<A, E, C>(
settings: Settings<A::Flags>,
compositor_settings: C::Settings,
) -> Result<(), Error>
@ -188,7 +188,7 @@ where
};
}
let compositor = C::new(compositor_settings, window.clone())?;
let compositor = C::new(compositor_settings, window.clone()).await?;
let mut renderer = compositor.create_renderer();
for font in settings.fonts {