iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
22.96k stars 1.06k forks source link

Support wasm target for `clock` example #2422

Open skygrango opened 2 weeks ago

skygrango commented 2 weeks ago

base on #2421

Fix the env loading problem by enabling wasm-bindgen feature with instant

problem : it failed on firefox log : https://gist.github.com/skygrango/6561e1a77a147c664f62ab2fef248a74

<wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::device_create_render_pipeline::he39460428393c56b http://127.0.0.1:8080/clock-c25483e98ad88e58_bg.wasm:4833636
<T as wgpu::context::DynContext>::device_create_render_pipeline::h77fdafe577d5f84d http://127.0.0.1:8080/clock-c25483e98ad88e58_bg.wasm:17303843`

I don't know how to fix it, maybe something wrong with widget/canvas

it almost work on chrome, except for drawing text 螢幕截圖_20240503_142518-1