There is an experimental --post-link option to create a JS file for a given linked wasm file. However it isn't aware of SPLIT_MODULE so I am not sure if it will work here.
On Tue, Apr 20, 2021 at 2:45 AM Александр Гурьянов <[email protected]> wrote: > Hi. I am trying to use SPLIT_MODULE with Unity. However unity shipped with > old emscripten that does not know how to deal with SPLIT_MODULE. I > successfully spitted wasm file with wasm-split, but I can't run it because > .js file can't load it. > > Is it possible to regenerate .js file for given wasm, wasm.deferred file? > Or if it is not possible, what I should define for correct work of > SPLIT_MODULE? Currently I even can't start main module, had this error: > > > index.js:1 3943ms | ERR! RangeError: offset is out of bounds > at Int8Array.set (<anonymous>) > at mergeMemory (eval at value ( > http://localhost:3000/dev/web/debug/gamepix-loader.js:6586:98), > <anonymous>:1059:17) > at receiveInstance (eval at value ( > http://localhost:3000/dev/web/debug/gamepix-loader.js:6586:98), > <anonymous>:1120:33) > at http://localhost:3000/dev/web/debug/gamepix-loader.js:6743:119 > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVHu%2B5srLKjuitYZLhtpbiFg6RdSjLytNcg6XwzDk3Wf%2Bw%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVHu%2B5srLKjuitYZLhtpbiFg6RdSjLytNcg6XwzDk3Wf%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRL2w5gdbB5-LLi9xSvTeThPdOANub5uwodx2MNovjs-g%40mail.gmail.com.
