Thanks! I found the place where the HTML is trying to load the .wasm, so that seems to work (for some reason it injected the absolute path to the .wasm file into the .html, so it would try to do "GET /Users/floh/projects/fips-deploy/oryol/wasm-make-release/Clear.wasm".
With that fixed manually, I now get a magic number mismatch from the .wasm loader (currently testing in Chrome), I guess this is what you mean that it won't work: Clear.js:88157 Uncaught WASM.instantiateModule(): Result = expected magic word 00 61 73 6d, found 00 80 10 80 @+0 But I think I have enough info now to fix the remaining issues :) Thanks! -Floh. Am Dienstag, 15. März 2016 19:09:06 UTC+1 schrieb Alon Zakai: > > Looks like we posted at around the same time :) > > That .wasm is not going to run in browsers. But it would run in the > binaryen interpreter (veeery slowly). Follow the instructions in the link > to generate a binary that browsers can run. Again, this is annoying now > since the spec is in flux, but it'll get better over the next few months. > > mappedGlobals is necessary. Wasm lacks globlals, but asm.js has them, so > asm2wasm needs extra metadata, which it places in that file. > > > On Tue, Mar 15, 2016 at 11:07 AM, Floh <[email protected] <javascript:>> > wrote: > >> Ok, seems like I solved the first part, there's a wasm-as tool in >> binaryen which takes a text .wast file and convertes it to a binary .wasm >> file. >> >> So, 2 remaining questions: >> >> - how to integrate this .wasm file with the browser module .js file so >> that it is loaded by the browser? (I compiled with emcc -s BINARYEN=1, and >> got a .html and .mem file, plus a .asm.js (which I guess is then converted >> to .wast), a .js file (which I think has the 'runtime environment' and >> polyfill, a .wast file (which I converted to .wasm), and finally a >> .wast.mappedGlobals file). >> >> - what about the mappedGlobals file, is this a temporary file, or will >> this be loaded at run-time? >> >> Thanks :) >> -Floh. >> >> Am Dienstag, 15. März 2016 18:26:37 UTC+1 schrieb Floh: >> >>> Hi, >>> >>> I'm currently playing around with binaryen to compile my demos to >>> WebAssembly, but it looks like this can only generate .wast (text) files, >>> is this correct? >>> >>> Is there a already way to create binary .wasm file with the help of >>> emscripten? >>> >>> I would *really* like to test my stuff with the new experimental >>> WebAssembly support in Firefox Nightly and Chrome Canary :) >>> >>> Cheers, >>> -Floh. >>> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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]. For more options, visit https://groups.google.com/d/optout.
