Repository navigation
cvcpkg: wasmtime in the arix and ariglx recipes, linked by name (G1, ninth part) - #1148
Merged
Merged
Conversation
…ninth part) The packaged scripting hosts were built without wasmtime, so a document's wasm: block ran only in a host someone built by hand. Both recipes now name wasmtime as a build and runtime dep and configure with -DARI_WITH_WASM=ON / -DARIGL_WITH_WASM=ON, so a build that can't find it fails instead of packaging a host without guests. publish-cvcpkg.yml installs wasmtime for their steps, and each host runs src/ariadne_wasm/tests/wasm_block.ari before it packs: arix test, and ariglx check. Linked by name. Upstream's Linux libwasmtime.so has no SONAME, and the cvcpkg package's target is UNKNOWN, so CMake linked it by its path, and the host recorded that path, relative to its build tree, as the library it needs: an installed arix could not have loaded it, and even the build tree's only from its own directory. cvc_ariadne_wasm_host now links it through a SHARED imported target with IMPORTED_NO_SONAME, so the host needs plain libwasmtime.so, found in ../lib beside libcvc.
transfix
enabled auto-merge (squash)
November 11, 2026 20:28
transfix
added a commit
that referenced
this pull request
Nov 12, 2026
Only job_intrinsics_test.cpp conflicted. Master's #1150 fixed the same pre-#1137 calls this branch fixed in 600c144, but kept a ProviderGuard that clears the app's providers on the way out; this takes master's version, so the file matches master. The rest merged cleanly: #1151's spawn points (world_spawns.cpp, the world rules' spawns, the loader and scene-world tests), #1145's macOS libcurl with WebSockets (CMake and a ci.yml configure assertion), #1148's wasmtime in the arix and ariglx recipes, and #1149's ocean band. None of them registers an action-intrinsic provider, and none adds writable process-wide state: their only new statics are vehicle_view.cpp's constant colour tables.
transfix
added a commit
to cy-pca/cvcpkg
that referenced
this pull request
Nov 13, 2026
Upstream's Linux libwasmtime.so (wasmtime 45.0.0 C API) has no DT_SONAME, and cvc.1's wasmtimeConfig.cmake made wasmtime::wasmtime an UNKNOWN imported target, so every consumer recorded the path it linked the library from as DT_NEEDED (../wt/lib/libwasmtime.so in transfix/libcvc#1148) and failed to load once installed. - build.sh sets the SONAME libwasmtime.so with cvcpkg's patchelf. - The generated config follows the bundle's link variant: SHARED IMPORTED with IMPORTED_SONAME in a shared bundle, STATIC IMPORTED over libwasmtime.a in a static one (cvc.1's static bundles handed out the .so). - test.sh + smoke/: checks the library's own name, builds a find_package(wasmtime) consumer, checks what it records, and runs it from a bin/ + lib/ copy. - bin/wasmtime is declared for linux and macos only: build.ps1 never staged the CLI, and strict package.files refused the Windows pack. - depends.runtime: [] keeps the new build tools (patchelf, cmake, ninja) out of the bundles' required deps. The macOS dylibs already name themselves @rpath/libwasmtime.dylib and are unchanged.
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.
G1, ninth part: the packaged
arixandariglxrun a document'swasm:block (roadmap §8.3).The problem
arixandariglxpackages were built without wasmtime. So awasm:block ran only in a host someone built by hand.libwasmtime.sohas no SONAME, and the cvcpkg package'swasmtime::wasmtimeis anUNKNOWNimported target. So CMake links it by its path, and the host records that path as the library it needs:../wt/lib/libwasmtime.so, relative to the build tree.The fix
The recipes (
cvcpkg/recipes/arix,cvcpkg/recipes/ariglx):wasmtimeis a build dep and a runtime dep, socvcpkg install arixbrings it into the same prefix.build.shconfigures with-DARI_WITH_WASM=ON/-DARIGL_WITH_WASM=ON, so a build that can't find wasmtime fails instead of packaging a host without guests.wasm:block does.The publish workflow (
publish-cvcpkg.yml), in the arix and ariglx steps:wasmtimeinto a prefix of its own and adds it toCVC_DEPS_PREFIXandLD_LIBRARY_PATH.src/ariadne_wasm/tests/wasm_block.ari:arix test, which must reportok … (6 tests;ariglx check, whoserequires: [wasm],ari_initandinit:call into the guest must load.Linked by name (
src/ariadne_wasm/ariadne_wasm.cmake). On Linux,cvc_ariadne_wasm_hostlinks a.sowasmtime through its ownSHARED IMPORTED GLOBALtarget withIMPORTED_NO_SONAME. CMake then links it as-lwasmtime, and the host needs plainlibwasmtime.so, found in../libbeside libcvc. Windows and macOS are unchanged.Docs
Tests
The link, in WSL (Ubuntu 22.04, cvcpkg's Linux
wasmtime45.0.0+cvc.1). A small program linked through this tree's realariadne_wasm.cmake:bin/+lib/, build prefix gone../wt/lib/libwasmtime.solibwasmtime.soengine okengine okWindows static tree:
arix(with wasm) reconfigured and rebuilt;arix_wasm_block,ari_wasm_needs_arixandariadne_wasm_testpass.cvcpkg validatepasses forarix. Forariglxit reports onlyimgui-w32, which the cvcpkg installed on this box doesn't know (cvcGL: Dear ImGui from the imgui-w32 package (a 32-bit ImWchar), imgui as the fallback #1072's dep);wasmtimeresolves.Not run: the publish workflow's new steps, which run at a release, or in a dry-run dispatch if you want one first. This PR's
package-linuxjob buildsarixin-tree against shared wasmtime on Linux and runs the wasm tests with the new link.Left for G1
state_exec.policy, andpureexports on the read lane.