Skip to content

wasm: link SDL3 into the cvcgl wasm bundle (install sdl3 in WASM_DEPS) - #450

Merged
transfix merged 1 commit into
masterfrom
design/cvcgl-wasm-sdl3
Sep 28, 2026
Merged

transfix merged 1 commit into
masterfrom
design/cvcgl-wasm-sdl3

Conversation

@transfix

@transfix transfix commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

What (item 2 — wasm-SDL3, the second half)

Every wasm-mt cvcgl bundle so far shipped the VTK-interactor fallback: publish-cvcgl-wasm's $WASM_DEPS closure never installed sdl3, so find_package(SDL3 CONFIG) failed under emcmake and CVC_ENABLE_SDL was off — the wasm SDK had no SDL input/peripheral seam even though its manifest declared sdl3.

Fix: add sdl3 to $WASM_DEPS. The build already passes -DCMAKE_FIND_ROOT_PATH="$WASM_DEPS", so cvcGL's find_package(SDL3 CONFIG) now resolves it → links SDL3::SDL3 → CVC_ENABLE_SDL on → cvcGLConfig emits find_dependency(SDL3). Plus cvc_revision 5 → 6 (publish-cvcgl-wasm packs cvcgl verbatim at the recipe revision, so a bump is required to republish the SDL3-linked wasm bundle).

Feasibility (checked)

  • sdl3 wasm-mt is a published static bundle (3.4.12+cvc.4).
  • No Emscripten -sUSE_SDL port anywhere in the wasm build/VTK/cvcGL — so no clash with a built-in SDL.
  • SdlInput.cpp is fully CVC_ENABLE_SDL-guarded.
  • SDL-on-wasm-mt is verified working with VTK (per the original SDL request).

Fail-loud

Since sdl3 is now present, cvcGL must link it — the build step errors if cvcGLConfig lacks find_dependency(SDL3), so we never publish a "SDL3" revision that silently fell back to VTK.

⚠️ Merge sequencing — HOLD until cvc-9f's wasm deploy lands

publish-cvcgl-wasm runs only on workflow_dispatch, so PR CI does not exercise this — the first wasm publish run is the real validation of the SDL3-under-emscripten link (the one genuinely untested path). cvc-9f is about to run publish-cvcgl-wasm on the current master for a downstream wasm deploy (VTK-fallback, off the wasm-resolve fix #448) — and explicitly wants that critical-path deploy not gated on the first-time wasm SDL3 link. So this PR must not merge until their deploy is confirmed; then a separate wasm publish produces cvcgl +cvc.6 with SDL3 actually linked. Native lanes are unaffected (they already link SDL3 via #444).

Every wasm-mt cvcgl bundle so far shipped the VTK-interactor fallback:
publish-cvcgl-wasm's $WASM_DEPS closure never installed sdl3, so
find_package(SDL3 CONFIG) failed under emcmake and CVC_ENABLE_SDL was
off — the wasm SDK carried no SDL input/peripheral seam even though its
manifest declared sdl3.

Add sdl3 to $WASM_DEPS. The build already passes
-DCMAKE_FIND_ROOT_PATH="$WASM_DEPS", so cvcGL's find_package(SDL3 CONFIG)
now resolves it → links the relocatable SDL3::SDL3 → CVC_ENABLE_SDL on →
cvcGLConfig emits find_dependency(SDL3). Feasibility checks: sdl3 wasm-mt
is a published static bundle (3.4.12+cvc.4); no Emscripten -sUSE_SDL port
is in play (no clash with a built-in SDL); SdlInput.cpp is fully
CVC_ENABLE_SDL-guarded; SDL-on-wasm-mt is verified working with VTK.

Fail-loud check: since sdl3 is now present, cvcGL MUST link it — the
build step errors if cvcGLConfig lacks find_dependency(SDL3), so we never
ship a "SDL3" revision that silently fell back to VTK.

cvcgl cvc_revision 5 -> 6: publish-cvcgl-wasm packs cvcgl VERBATIM at the
recipe revision, so a bump is required to republish the SDL3-linked wasm
bundle. cvcGL source unchanged; native lanes auto-bump independently and
are unaffected (they already link SDL3 via #444).

NB publish-cvcgl-wasm runs only on workflow_dispatch, so this is NOT
exercised by PR CI — the first wasm publish run is the real validation of
the SDL3-under-emscripten link (the one genuinely untested path).
@transfix
transfix force-pushed the design/cvcgl-wasm-sdl3 branch from 89a5078 to 118ad0a Compare September 28, 2026 16:09
@transfix
transfix merged commit 578c69f into master Sep 28, 2026
13 checks passed
@transfix
transfix deleted the design/cvcgl-wasm-sdl3 branch October 29, 2026 20:51
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