Skip to content

examples(wasm): wasm-enable the Ariadne host + ship the DSL volume bunny demos to the web gallery - #547

Merged
transfix merged 4 commits into
masterfrom
feat/ariadne-wasm-demos
Oct 2, 2026
Merged

transfix merged 4 commits into
masterfrom
feat/ariadne-wasm-demos

Conversation

@transfix

@transfix transfix commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Builds on #546 (the DSL volume bunny demos + mesh-SDF volume source, now on master). Makes the generic Ariadne .ari host compile to WebAssembly so pure-DSL demos deploy to the browser gallery, and wires volren_bunny_ari / volslice_bunny_ari into the deploy.

What

  • ariadne_hello wasm host — asyncify yield in the windowed loop, a compiled-in default .ari doc (CVC_ARIADNE_WASM_DOC), and the shared component library embedded into MEMFS. Per-.ari wasm targets (<name>_ari) are added alongside the C++ volren_bunny/volslice_bunny demos — additive, not replacing.
  • yaml-cpp for wasm — build-wasm-demo.sh now builds yaml-cpp into CVC_WASM_DEPS (idempotent, pthread-matched to the module). It is the .ari loader's only extra dependency and is not in the cvcpkg wasm catalog; without it the loader degrades to a stub and the .ari demos ship blank. One edit covers both the libcvc Pages deploy and the branded cyberpcangel deploy, since both call this script.
  • Gallery — the two _ari slugs added to the deploy verify list + gallery metadata, with thumbnails.

Verified

  • Full wasm build (libcvc + cvcGL + SDF compiled for wasm, no prebake) succeeds; Release module is 27 MB.
  • Both .ari demos instantiate cleanly in-browser (runtime initialized, zero console errors, render loop running).
  • The identical .ari documents render the bunny correctly via native offscreen (the gallery thumbnails).

The SDF volume is computed live in the browser from the embedded Stanford mesh via one declarative source: { sdf: { mesh } } — no baked volume asset.

…r demos

Make the generic ariadne_hello host runnable in the browser so pure-DSL .ari demos
can deploy to the web gallery (the path for the volume bunny ports, and future A/V /
lsystem .ari demos):
- asyncify yield (emscripten_sleep(0)) in the windowed loop under __EMSCRIPTEN__;
- a compile-time default document CVC_ARIADNE_WASM_DOC used when no argv is given
  (the browser passes none), plus adding the MEMFS root so cvc://components/*.ari
  resolve at the embedded /components;
- CMake: per-.ari wasm targets (<name>_ari) built from ariadne_hello.cpp with the
  document + the component library embedded via --embed-file, under DISTINCT slugs so
  they sit ALONGSIDE the compiled C++ demos, not replacing them.

Deps note: deploying these needs yaml-cpp (the .ari loader) and CVC_ENABLE_SDF added
to the wasm build; wired separately.
Build yaml-cpp for wasm into CVC_WASM_DEPS in build-wasm-demo.sh (idempotent,
pthread-matched): it is the Ariadne .ari loader's only extra dependency and is
not in the cvcpkg wasm catalog, so without it the loader degrades to a stub and
the .ari demos ship blank. Add volren_bunny_ari + volslice_bunny_ari to the
deploy-pages verify list and the gallery metadata, with thumbnails.
…emos

# Conflicts:
#	src/cvcGL/examples/CMakeLists.txt
#	src/cvcGL/examples/ariadne_hello.cpp
@transfix
transfix enabled auto-merge (squash) October 2, 2026 22:44
@transfix
transfix merged commit c338282 into master Oct 2, 2026
14 checks passed
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.

1 participant