Skip to content

gallery: build the browser gallery with Jolt; it had the null backend - #1414

Merged
transfix merged 4 commits into
masterfrom
ci/gallery-jolt
Nov 21, 2026
Merged

transfix merged 4 commits into
masterfrom
ci/gallery-jolt

Conversation

@transfix

Copy link
Copy Markdown
Owner

The browser gallery on GitHub Pages has no physics engine. Its deploy never installed joltphysics, so the configure turned CVC_WITH_JOLT off and carried on: the deploy after #1369 logged "Jolt not found - cvc::physics has the null backend only". In terrain_lab the crates and the boat are placed but never move.

Nothing was missing on the libcvc side:

  • The catalog has joltphysics 5.6.0+cvc.6 for single-threaded wasm, from before the JX1 republish, so it links with libcvc's JS exceptions.
  • jolt_backend.cpp already runs Jolt's single-threaded job system when built without pthreads.
  • arigl-web's single-threaded package already links it.

Changes

  • deploy-pages.yml installs joltphysics (wasm, wasm32, static) in the loop with eigen, libigl and sdl3. A failed install fails the step, as it does for those.
  • examples/web/build-wasm-demo.sh:
    • It passes CVC_WITH_JOLT from a new CVC_WASM_JOLT (ON by default) and saves the configure output to configure.log.
    • Like the ImageMagick check above it, it fails when the configure did not report "cvc::physics Jolt backend ENABLED", rather than shipping a gallery whose bodies don't move.
  • The libcvc-examples-web recipe lists joltphysics among its build deps, and its build-wasm.sh sets CVC_WASM_JOLT=ON. Both columns have a bundle (wasm and wasm-mt). The package is next published at the next release, as each release's cvc.1, so cvc_revision stays 1.
  • CI's physics replay job (physics-wasm) is now a matrix over wasm-mt and wasm.
    • The new wasm leg builds the single-threaded libcvc that the gallery uses, on the catalog's Jolt.
    • It replays the native trace under node, which exercises the single-threaded job system and checks it is deterministic.
    • The wasm-mt leg keeps its name, "physics replay (wasm-mt, node)". Each leg has its own concurrency group, so neither cancels the other.

Checks

  • The changed shell scripts pass bash -n, and the YAML files parse. Every changed file keeps its CRLF line endings.
  • This PR's CI runs both physics replay legs, because ci.yml changed.
  • The gallery build itself runs only on the self-hosted deploy after merge. With the new check, a gallery without Jolt fails that deploy instead of going live. A failed deploy leaves the current site up.

After merge

  • Check that the deploy's configure log reports Jolt found.
  • Check that terrain_lab on transfix.github.io/libcvc shows the crates falling and bobbing, and the boat answering its helm.
  • Not measured yet: how much Jolt adds to the demos' .wasm, and terrain_lab's frame rate once its bodies move.

deploy-pages.yml never installed joltphysics, so the configure turned
CVC_WITH_JOLT off and the gh-pages gallery shipped cvc::physics with the
null backend: terrain_lab's crates and boat were placed but never moved.

- deploy-pages.yml installs joltphysics (wasm, wasm32, static) with the
  other wasm32 deps.
- build-wasm-demo.sh passes CVC_WITH_JOLT from CVC_WASM_JOLT (ON by
  default) and, like ImageMagick, fails the build when the configure did
  not find Jolt, instead of shipping without it.
- The libcvc-examples-web recipe lists joltphysics among its build deps
  and asks for it (CVC_WASM_JOLT=ON).
- CI's physics replay job also runs single-threaded (wasm), the flavor
  the gallery serves: Jolt's single-threaded job system, on the catalog's
  wasm bundle, replays the native trace under node.
@transfix
transfix enabled auto-merge (squash) November 20, 2026 23:11
@transfix
transfix disabled auto-merge November 21, 2026 03:24
The new single-threaded physics replay leg failed at the link:
"em++: error: -sPROXY_TO_PTHREAD requires -pthread to work!". The test
always linked with -sPROXY_TO_PTHREAD, which only the wasm-mt build it was
written for has. Single-threaded there are no cvc::app workers to wait on
and Jolt runs its single-threaded job system, so main stays on the main
thread. The configure found Jolt and libcvc compiled; only this link
failed.
… hours

The replay takes about a second. The new single-threaded leg is not a
required check, so a run that hung there would stall long after the
required jobs had passed.
@transfix
transfix enabled auto-merge (squash) November 21, 2026 03:26
…allery-jolt

# Conflicts:
#	.github/workflows/deploy-pages.yml
#	cvcpkg/recipes/libcvc-examples-web/recipe.yaml
@transfix
transfix merged commit c951eff into master Nov 21, 2026
30 checks passed
@transfix
transfix deleted the ci/gallery-jolt branch November 21, 2026 08:56
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