When building my app with a build of latest emsdk 3.1.69, I found that
the virtual file system would no longer be populated and only contained
the bare hardcoded minimum. Turned out that
> commit 483cdcd5306780520a2de8856fcd13910e71497e
> Author: Sam Clegg <
s...@chromium.org>
> Date: Thu Oct 3 14:35:51 2024 -0700
>
> Micro-optimize preRun/postRun handling. NFC (#22671)
[...]
> diff --git a/src/preamble.js b/src/preamble.js
> index d37cb9fe7..3a6aee9c9 100644
> --- a/src/preamble.js
> +++ b/src/preamble.js
> @@ -195,11 +195,10 @@ function preRun() {
> assert(!ENVIRONMENT_IS_PTHREAD); // PThreads reuse the runtime from the main thread.
> #endif
> #if expectToReceiveOnModule('preRun')
> - if (Module['preRun']) {
> - if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
> - while (Module['preRun'].length) {
> - addOnPreRun(Module['preRun'].shift());
> - }
> + var preRuns = Module['preRun'];
> + if (preRuns) {
> + if (typeof preRuns == 'function') preRuns = [preRuns];
> + preRuns.forEach(addOnPreRun);
> }
> #endif
> callRuntimeCallbacks(__ATPRERUN__);
[...]
caused the function runWithFS to no longer be called, because it gets
added to Module.preRun from within the function runMetaWithFS that
itself is called from within the function preRun.