Closed ianthomas23 closed 3 months ago
with the
-sMODULARIZE=1
flag removed, which is what this PR does.
I think you ment sSINGLE_FILE=1
flag removed
I think you ment
sSINGLE_FILE=1
flag removed
Yes, I did mean that, I'll edit the initial comment. And I forgot to bump the build numbers too 😮
Cockle (JupyterLite terminal) now supports dynamic loading of Emscripten-built WASM modules provided the WASM is embedded in a JavaScript file. With just a few adjustments this should be able to support separate WASM and JS files. To complete that I need to build the 3 modules (
cockle_fs
,coreutils
andgrep
) with the ~-sMODULARIZE=1
~-sSINGLE_FILE=1
flag removed, which is what this PR does.In addition, whilst we are rebuilding these recipes we can also simplify the recipes for WASM command modules (
coreutils
andgrep
) by removing the-sINVOKE_RUN=0
flag and removingcallMain
from the list of exported runtime methods. This is because we no longer need to load the JS/WASM module in one step and then call it usingcallMain
as we can load and call it automatically as part of the load.These changes could also be attempted with more complicated modules like
lua
, but I will try that separately once this is proven to work.(Edited to correct mistake)