the little wasm boy: imgui family built from source into the wasm playground + CI lane - #3358
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the wasm playground’s ImGui integration from a prebuilt-archive (DAS_WEB_IMGUI_DIR) approach to building the “imgui family” (dasImgui, dasImguiImplot, dasImguiNodeEditor) from source when those repos are cloned into modules/, and adds a dedicated CI lane (“wasmboy”) to exercise that Emscripten/superbuild path under Node.
Changes:
- Remove the root CMake-based
DAS_WEB_IMGUI_DIRexternal wiring and the web-side prebuilt archive linking. - Add EXISTS-gated
--embed-filemounts for the cloned external modules’.dastrees (plus required ImGui font + dasLiveHostlive/*) inweb/CMakeLists.txt. - Add a Node-based smoke test (
examples/fatman/wasmboy.das+web/test/wasmboy_node.js) and a new GitHub Actions workflow (.github/workflows/wasmboy.yml) to build and run it; update Pages deploy flow accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
web/test/wasmboy_node.js |
New Node runner to mount the repo via NODEFS and execute wasmboy.das inside the wasm build. |
web/CMakeLists.txt |
Replace DAS_WEB_IMGUI_DIR embedding/linking with clone-detected embed mounts for the external ImGui-family .das sources. |
skills/build_and_debug.md |
Update docs to reflect ImGui as an external module (clone/junction into modules/) rather than DAS_WEB_IMGUI_DIR. |
examples/fatman/wasmboy.das |
New require-smoke script to validate registration/boost-path resolution + static linking for wasm. |
CMakeLists.txt |
Remove the EMSCRIPTEN + DAS_WEB_IMGUI_DIR-gated external dasImgui registration block. |
.github/workflows/wasmboy.yml |
New CI workflow to clone externals, build daslang_static (pthread), and run the smoke under Node. |
.github/workflows/pages.yml |
Update deploy pipeline to clone externals for the wasm32 playground build, then remove them before wasm64 steps; add non-fatal fallback rebuild. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…yground + CI lane The wasm counterpart of the fat man (#3351). The playground interpreter (daslang_static) now gets the imgui family (dasImgui + dasImguiImplot + dasImguiNodeEditor) by cloning them into modules/ — the modules glob absorbs their both-worlds CMakeLists (the superbuild-emscripten arm), which registers the C++ modules + imgui/<name> boost paths and compiles + statically links the archives from source. This deletes the entire DAS_WEB_IMGUI_DIR hand-wiring: - root CMakeLists: the EMSCRIPTEN+DAS_WEB_IMGUI_DIR NATIVE_MODULE/ADD_MODULE_CPP block (incl. the imgui_boost_v2 tolerance shim, dead since dasImgui #218) - web/CMakeLists: the prebuilt liblib*.a link block and its -Wl,--allow-multiple-definition (the DAS_IMGUI_APP_EXTERN_GLFW_TYPE_FACTORY guard from dasImgui #219 kills the GLFWwindow typeFactory dupe at source); embeds now EXISTS-gated on the cloned modules, mounted at the paths the superbuild registrations resolve (modules/dasImgui/widgets, implot + node-editor daslib), marker-check mirroring the root glob - pages.yml: step 0 (daspkg install + standalone _wasm_build32mt archive build) becomes clone -> threaded playground build -> rm clones before the wasm64 daspkg release steps (those keep using the externals' STANDALONE emscripten branches, untouched); non-fatal fallback rebuilds plain if an external's master regressed New CI lane .github/workflows/wasmboy.yml (fatman.yml's web sibling): clone the imgui family, emcmake-build the threaded daslang_static, run the require-smoke examples/fatman/wasmboy.das under node via web/test/wasmboy_node.js — registration + boost-path resolution (--embed-file mounts) + the static wasm link, no browser, no GPU. Needs dasImgui's superbuild-emscripten fix (gl3w excluded from the wasm superbuild) merged first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The little wasm boy
The fat man's (#3351) web-side sibling. The playground interpreter (
daslang_static) now gets the imgui family (dasImgui + dasImguiImplot + dasImguiNodeEditor) by cloning them intomodules/— the modules glob absorbs their both-worlds CMakeLists (the superbuild-emscripten arm), which registers the C++ modules +imgui/<name>boost paths and compiles + statically links the archives from source, in-build. The entireDAS_WEB_IMGUI_DIRprebuilt-archive hand-wiring is deleted.Deleted
CMakeLists.txt: theEMSCRIPTEN AND DAS_WEB_IMGUI_DIRNATIVE_MODULE/ADD_MODULE_CPP block, incl. theimgui_boost_v2tolerance shim (dead since dasImgui cmake: msvc: add flag DAS_USE_STATIC_STD_LIBS #218)web/CMakeLists.txt: the prebuiltliblib*.alink block and its-Wl,--allow-multiple-definition— dasImgui cmake: add option DAS_CONFIG_INCLUDE_DIR #219'sDAS_IMGUI_APP_EXTERN_GLFW_TYPE_FACTORYguard (set by the superbuild arm) kills theGLFWwindowtypeFactory dupe at source; verified the final wasm link is clean without the flagpages.yml: step 0 (daspkg install + standalone_wasm_build32mtarchive build + theDAS_WEB_IMGUI_DIR/PLAYGROUND_IMGUIflags)Added
web/CMakeLists.txt:--embed-filemounts EXISTS-gated on the cloned modules, at the paths the superbuild registrations resolve (modules/dasImgui/widgets— note:widgets, not the old/imguimount — + font + dasLiveHostlive/*, implot + node-editordaslib/); each gate mirrors the root glob's.daspkg_standalonemarker check. Implot + node-editor are NEW in the playground interpreter (the old wiring bound dasImgui only).examples/fatman/wasmboy.das— the imgui-family require-smoke (registration + boost-path resolution via the embeds + the static wasm link; no canvas, runs under plain node), driven byweb/test/wasmboy_node.js(NODEFS mount + callMain, modeled ondastest_wasm.js).github/workflows/wasmboy.yml— fatman.yml's web sibling: clone the 3 externals → emcmake-build the threadeddaslang_static(-DDAS_WASM_PTHREADS=ON, the exact config pages.yml deploys, emsdk pinned 5.0.7 like pages.yml) → run the smoke under node. This is the only CI exercising the externals' superbuild-emscripten arm.pages.yml: clone → threaded playground build → rm the clones before the wasm64 steps (the daspkg release flow keeps using the externals' STANDALONE emscripten branches via the package index —web/build64must not absorb the clones); non-fatal fallback rebuilds plain if an external's master regressed, so a broken external can't block docs deploys.skills/build_and_debug.md: one-line factual fix (the "dasImgui is wired via DAS_WEB_IMGUI_DIR" claim is now wrong).Verified
modules/): configure absorbs all three, 280/280 build,daslang_staticlinks without--allow-multiple-definition, node smoke exit 0.-Werror(all vendored imgui/implot/node-editor sources warning-clean), node smoke printsthe little wasm boy stands: ..., exit 0.site/playgroundserved COOP/COEP: Path Tracer Lab compiles + runs in the interpreter — ImGui panel renders, click interaction switches render mode, CPU-threads mode traces at 1.0M rays/s vs 0.3M single-thread (real Web-Worker pthreads), 0 console errors..dasset:0 issue(s), 0 error(s)(the require-smoke SKIPs prerequisite resolution on hosts without the externals, same asfatman/main.das).--full: 13 passed, 0 failed, 4 skipped (no-C++-changed, latexmk-absent, and the two documented DLL-flavor relink skips on a diff with zero AOT/GLFW-das surface — interp + JIT suites passed).Ordering
Requires borisbat/dasImgui#220 (gl3w excluded from the emscripten superbuild — merged,
b2d5413) — the wasmboy lane clones dasImgui@master.🤖 Generated with Claude Code