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]> 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]. > 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.
