s2wasm, what distinguishes --global-base from --allocate-stack ?
Hey there, I guess my question is pretty straight but: For s2wasm, what distinguishes --global-base from --allocate-stack ? I don't really understand the purpose of --allocate-stack (wasm has its own way to allocate variable on the stack with «set_local») and I guess it's something related to --global-base. Thanks, -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: -s EXPORTED_FUNCTIONS and -s ONLY_MY_CODE=1 -s WASM=1
Also, is it safe to think «-s WASM=1 -s SIDE MODULE=2» will stay maintained in future release? Should I move to the vanilla LLVM ? On Thursday, August 24, 2017 at 8:01:39 PM UTC+2, Jean Valjean wrote: > > Sorry, I forgot to say I use the *-s ONLY_MY_CODE=1 -s WASM=1 -s > SIDE_MODULE=2* parameters, and *-s ONLY_MY_CODE=1* works well with *-s > SIDE_MODULE=2*, also, it produces a lightweight *.wasm* output. > > Since the 1.37.20, emscripten is now able to deal with *-s > EXPORTED_FUNCTIONS*. It's fine for me now. > > On Thursday, August 24, 2017 at 5:35:10 AM UTC+2, Jean Valjean wrote: >> >> Hello there :) >> >> Right now, -s EXPORTED_FUNCTIONS doesn't seem to work with Standalone >> webassembly (provided by -s ONLY_MY_CODE=1 -s WASM=1 ). The code exports a >> lot of functions and it makes the wasm output really big. Is there an >> available parameter for this ? >> >> Bye >> > -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
-s EXPORTED_FUNCTIONS and -s ONLY_MY_CODE=1 -s WASM=1
Hello there :) Right now, -s EXPORTED_FUNCTIONS doesn't seem to work with Standalone webassembly (provided by -s ONLY_MY_CODE=1 -s WASM=1 ). The code exports a lot of functions and it makes the wasm output really big. Is there an available parameter for this ? Bye -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Binaryen and total size of «Heap» memory used when loading.
Hello everyone, Is there a «verbose» mode with bynaren that could tell us the size used in the shared memory with javascript ? Some hints in my wast file : (data (i32.const 16) "foo \00") (data (i32.const 32) "foo \00") With that information, I could define precisely where I can start to store custom data in my «WebAssembly.Memory» object. Thanks -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: About vanilla wasm and emcc SIDE_MODULE
Thanks for your detailed answer, it's really helpful. For the "WebAssembly.Table" feature, I was talking about this https://github.com/mdn/webassembly-examples/blob/master/js-api-examples/table2.wat On Thursday, August 10, 2017 at 7:23:15 PM UTC+2, Alon Zakai wrote: > > Global destructors aren't called for you, and so far the dynamic library > spec (which is the basis for current side module support) doesn't have a > feature for that. So you'd need to do that manually. > > There are some differences between how asm2wasm and the wasm backend > (vanilla llvm) allocate the stack. The wasm backend path is not stable yet > so you might be seeing a bug there, but also I think that side modules > haven't been tested with the wasm backend yet. I'd use the default compiler > path (asm2wasm) until the wasm backend is stable. > > Not sure what you're asking about Table. Your compiled c++ code should use > it automatically. > > On Wed, Aug 9, 2017 at 9:27 PM, Jean Valjean <me...@hotmail.com > > wrote: > >> Also, do you recommend the use of emscripten for "vanilla wasm" output or >> should I stick with the original LLVM distrib ? >> >> -- >> 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 emscripten-discuss+unsubscr...@googlegroups.com . >> 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: About vanilla wasm and emcc SIDE_MODULE
Also, do you recommend the use of emscripten for "vanilla wasm" output or should I stick with the original LLVM distrib ? -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: About vanilla wasm and emcc SIDE_MODULE
Thanks for the detailed answer, I appreciate your help :) I have some questions about that: 1) Are the global destructors called ? 2) Also, "__post_instantiate" seems to allocate the stack but the Vanilla LLVM doesn't do that. Doesn't Wasm have its own default stack ? And more : 3) How can I use the WebAssembly.Table feature in my wasm output (from my c++ code) ? -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
About vanilla wasm and emcc SIDE_MODULE
Hello there, Sorry for my approximate english. It is now possible to make a standalone WebAssembly file. I'm gladly to see that is possible now with Emscripten, thanks. I can now make my own HTML source content, with my own way to load the WebAssembly bytecode. But I don't understand why the "__post_instantiate" function is exported too ? The wiki at https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md says it's about a dynamic link feature... but I feel that I just need a vanilla wasm file without such feature. It's how I compile my code currently : C:\dev\emscripten\emscripten\em++ -s ONLY_MY_CODE=1 -s WASM=1 -s SIDE_MODULE=2 -s DISABLE_EXCEPTION_CATCHING=1 -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s EXPORTED_FUNCTIONS="['_myfunc','_myfunc2']" -std=c++11 -g0 -O3 foo.cpp -o target.wasm Thanks, Jean -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.