Skip to content

the little wasm boy: imgui family built from source into the wasm playground + CI lane - #3358

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/wasmboy
Jul 2, 2026
Merged

the little wasm boy: imgui family built from source into the wasm playground + CI lane#3358
borisbat merged 1 commit into
masterfrom
bbatkin/wasmboy

Conversation

@borisbat

@borisbat borisbat commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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 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, in-build. The entire DAS_WEB_IMGUI_DIR prebuilt-archive hand-wiring is deleted.

Deleted

  • root CMakeLists.txt: the EMSCRIPTEN AND DAS_WEB_IMGUI_DIR NATIVE_MODULE/ADD_MODULE_CPP block, incl. the imgui_boost_v2 tolerance shim (dead since dasImgui cmake: msvc: add flag DAS_USE_STATIC_STD_LIBS #218)
  • web/CMakeLists.txt: the prebuilt liblib*.a link block and its -Wl,--allow-multiple-definition — dasImgui cmake: add option DAS_CONFIG_INCLUDE_DIR #219's DAS_IMGUI_APP_EXTERN_GLFW_TYPE_FACTORY guard (set by the superbuild arm) kills the GLFWwindow typeFactory dupe at source; verified the final wasm link is clean without the flag
  • pages.yml: step 0 (daspkg install + standalone _wasm_build32mt archive build + the DAS_WEB_IMGUI_DIR/PLAYGROUND_IMGUI flags)

Added

  • web/CMakeLists.txt: --embed-file mounts EXISTS-gated on the cloned modules, at the paths the superbuild registrations resolve (modules/dasImgui/widgets — note: widgets, not the old /imgui mount — + font + dasLiveHost live/*, implot + node-editor daslib/); each gate mirrors the root glob's .daspkg_standalone marker 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 by web/test/wasmboy_node.js (NODEFS mount + callMain, modeled on dastest_wasm.js)
  • .github/workflows/wasmboy.yml — fatman.yml's web sibling: clone the 3 externals → emcmake-build the threaded daslang_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/build64 must 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

  • Windows (emsdk 5.0.7, externals junctioned into modules/): configure absorbs all three, 280/280 build, daslang_static links without --allow-multiple-definition, node smoke exit 0.
  • WSL Ubuntu 24.04 verbatim-CI run (fresh clones, emsdk 5.0.7, the exact wasmboy.yml steps): build green under Linux emscripten clang -Werror (all vendored imgui/implot/node-editor sources warning-clean), node smoke prints the little wasm boy stands: ..., exit 0.
  • Playground card end-to-end in a real browser against the WSL-staged site/playground served 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.
  • CI-mirror lint on the changed .das set: 0 issue(s), 0 error(s) (the require-smoke SKIPs prerequisite resolution on hosts without the externals, same as fatman/main.das).
  • Preflight --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

Copilot AI review requested due to automatic review settings July 2, 2026 15:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_DIR external wiring and the web-side prebuilt archive linking.
  • Add EXISTS-gated --embed-file mounts for the cloned external modules’ .das trees (plus required ImGui font + dasLiveHost live/*) in web/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.

Comment thread web/test/wasmboy_node.js
Comment thread web/test/wasmboy_node.js
Comment thread web/CMakeLists.txt Outdated
Comment thread web/CMakeLists.txt Outdated
Comment thread web/CMakeLists.txt Outdated
Comment thread web/CMakeLists.txt Outdated
…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@borisbat
borisbat merged commit 125dc91 into master Jul 2, 2026
35 checks passed
@borisbat
borisbat deleted the bbatkin/wasmboy branch July 2, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants