Repository navigation
Conversation
romdev-core-host documents a bytes-only browser path, but the glue it would
load could not run there: the 2D libretro cores and every tool linked with
EM_CLI_FLAGS were built with -s ENVIRONMENT=node, so emcc hard-codes
ENVIRONMENT_IS_NODE=true and the glue's first act is `await import("module")`.
In a page or Web Worker that throws "Failed to resolve module specifier
'module'" before the wasm is instantiated, although these cores and tools use
nothing but MEMFS. The GPU cores already link with node,web.
EM_CLI_FLAGS (sdcc/sdas*/sdld, mcpp, rgbds, cc65, asar, dasm, sjasm, tcc816,
wla-dx) and the 14 2D core recipes (bsnes included) now use
-s ENVIRONMENT=node,web,worker. Under Node the runtime check still picks node.
The flag only changes the JS glue: mcpp linked both ways gives a
byte-identical .wasm, and the rebuilt gambatte, fceumm, fake08, geargrafx,
gpgx, handy, mgba, prosystem, snes9x, stella2014, vice, dasm, tcc816 and
wla-dx .wasm files are byte-identical to the published ones.
verify-wasm.mjs now refuses to publish those glue files if they come out
node-only again. NODERAWFS builds, the GPU cores, the gcc-family wraps and
rizin/decompiler are unchanged.
This was referenced Oct 29, 2026
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.
Fixes #7.
Replaces #8, which had picked up unrelated fork work. This is one commit on current main.
-s ENVIRONMENT=node->node,web,workerforEM_CLI_FLAGSinscripts/_lib.sh(sdcc/sdas*/sdld, mcpp, rgbds, cc65, asar, dasm, sjasm, tcc816, wla-dx) and the 14 2D core recipes (bluemsx, bsnes, fake08, fceumm, gambatte, gametank, geargrafx, genesis_plus_gx, handy, mgba, prosystem, snes9x, stella2014, vice)scripts/verify-wasm.mjsrefuses to publish those glue files if they come out node-only againUnchanged: NODERAWFS builds, the GPU cores,
EM_WRAP_FLAGS, the decompiler.Under Node the runtime check still picks node. The flag only changes the JS glue: mcpp linked both ways gives a byte-identical .wasm, and the rebuilt gambatte, fceumm, fake08, geargrafx, gpgx, handy, mgba, prosystem, snes9x, stella2014, vice, dasm, tcc816 and wla-dx .wasm files matched the published ones. No versions are bumped; the affected payloads need a rebuild and publish in your release flow, and until then verify-wasm flags the old node-only glue.
Not verified: bsnes is new since #8 and I have not rebuilt it. The bluemsx and gametank recipes did not build in my setup last time (details in #8).
Checked: verify-wasm passes on rebuilt node,web,worker gambatte, fceumm and sdcc payloads, and fails with exit 1 on a node-only glue file.