You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web (wasm32) support: CI check and examples runnable in the browser #29
The user expects to run bullseye apps as wasm builds. The reference shell already has a web build (trunk, eframe's WebRunner, WebGL2) that behaves the same as native.
Today
cargo check --lib --target wasm32-unknown-unknown passes on main (the toolchain target is installed locally). The only std::time::Instant use is in a test benchmark (src/measure.rs), which never runs on web. Nothing guards this yet.
Plan
CI guard: add a wasm step to cargo xtask ci that runs cargo check --lib --target wasm32-unknown-unknown, plus the examples once they build for web. The CI workflow installs the target. A dependency or API that breaks the web build then fails CI immediately.
Examples run in the browser:cargo xtask web <example> builds the example for wasm32 and serves it locally (trunk or wasm-bindgen with a small server run by xtask, in a process group xtask ends itself). Each example's native main and its web entry share one app constructor in examples/common, so they never diverge.
Web-specific behaviour:
Fonts: no filesystem font scan on web. known_gaps shows its "no weighted faces found" note there.
Time: egui's own clock only, never std::time::Instant outside tests. A lint or grep step can guard this.
Same-frame layout: a browser repaints only on input, so any one-frame-stale size is visible there (see the M7 same-frame regions note). Try the examples in the browser as part of review.
Snapshots and tests stay native: kittest runs on the host.
Where
A small PR after #28 and before M4c, so M4c's examples changes are web-checked from the start.
Activity