Repository navigation
Conversation
common::launch is the single place an example becomes an eframe app: run_ui_native on the host, WebRunner on a canvas on wasm32. The examples with their own loops (chat_shell, kaolin, todo, known_gaps, hello) and the shared shell now end in it, so the two builds cannot diverge. known_gaps scans no font directories on wasm and shows its "no weighted faces" note. Only new dev-dependency: wasm-bindgen-futures, wasm32-only. The library's dependencies are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
cargo xtask ci now checks the library and every example for wasm32-unknown-unknown (ci.yml installs the target), and fails if non-test library code names std::time::Instant or SystemTime, which panic in the browser. The check is a built-in step with unit tests. Add cargo xtask web NAME to try an example in the browser (#29) Builds the example for wasm32, runs the wasm-bindgen CLI into target/web/NAME/, writes an index.html with the canvas, and serves it from a std-only static server in xtask until Ctrl+C (no child outlives xtask). Refuses with the exact install command when wasm-bindgen is missing or does not match the version Cargo.lock pins. README and CLAUDE.md document it and make browser try-outs part of UI review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29.
What
cargo xtask cigains awasmstep (cargo check --target wasm32-unknown-unknown --lib --examples) and aclockstep. Theclockstep fails onInstantorSystemTimein non-test library code, because both panic on wasm.ci.ymlinstalls the target.common::launch(title, inner_size, ui_fun)runseframe::run_ui_nativeon native and eframe'sWebRunneron thebullseye_canvascanvas on wasm32. All 20 examples build for the web with no exclusions. Each example'smainis the same code for both targets.cargo xtask web NAME [--release] [--port N]: builds the example for wasm32, runswasm-bindgen --target webintotarget/web/NAME/, writes anindex.html, and serves it from a small std-only server inside xtask, which runs until Ctrl+C. Before building, it checks that the installedwasm-bindgenCLI matches the version pinned inCargo.lock.known_gapsscans no fonts on the web and shows its "no weighted faces" note.wasm-bindgen-futures. The library's own dependencies are unchanged.Not yet verified
The page itself has not been loaded in a browser. The dev machine's
wasm-bindgenis 0.2.127 and the lock pins 0.2.130, soxtask webcorrectly stopped at the version check. To try it:Tests
clockcheck: comments, test items, and resuming after a test module. It also asserts that the real library is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up