Re: arc4random

2017-09-18 Thread Jukka Jylänki
2017-09-18 17:03 GMT+03:00 Dirk Vanden Boer : > I patched the expat source to include the declaration of the arc4random > function. That allows it to compile. > Seems like emscripten should provide the declaration though if it provides > the implementation. Otherwise every

Re: Firefox: Module.asm is undefined

2017-09-18 Thread Jukka Jylänki
The Module object definitely needs to exist before including the main .js file, otherwise the startup sequence won't connect to the right object. I.e. the "Html file generating the error:" will not be possible to work. I suppose changing to the working html file resolved all the issues here(?)

Re: JavaScriptCore ported to emscripten

2017-09-18 Thread Jukka Jylänki
Perfect! It would be great to see performance benchmarks of this vs native JSC (without JITting enabled) to see if there are substantial performance differences. I'm sure this would make for great conversation in the "WebAssembly will make shipping JS engines in browsers obsolete" crowds (in one

Re: arc4random

2017-09-18 Thread Jukka Jylänki
Searching for arc4random in Emscripten codebase gives: Searching 7677 files for "arc4random" c:\code\emsdk\emscripten\incoming\src\deps_info.json: 2: "arc4random": ["rand"], c:\code\emsdk\emscripten\incoming\src\library.js: 796: // For compatibility, call to rand() when code requests

Re: arc4random

2017-09-18 Thread Dirk Vanden Boer
I patched the expat source to include the declaration of the arc4random function. That allows it to compile. Seems like emscripten should provide the declaration though if it provides the implementation. Otherwise every project that uses the cmake infrastructure to detect this function

Re: arc4random

2017-09-18 Thread Dirk Vanden Boer
I think it would solve expat's problem because the arc4random detection code will not define _BSD_SOURCE on a non BSD system.So it will not detect the presence of the arc4random function and will not try to use it. On Monday, September 18, 2017 at 8:58:00 PM UTC+2, jj wrote: > > The

Re: arc4random

2017-09-18 Thread Jukka Jylänki
The implementation of arc4random comes from this ancient commit from February 2013: https://github.com/kripken/emscripten/commit/a5c78a58902abd6166a81a895cc9eea141c9cab4. There is no grand reason behind supporting it, and there doesn't exist a BSD compatibility layer of any kind in general (this

Re: No SDL2_mixer port? What do people use for sound+music?

2017-09-18 Thread Aidan Hobson Sayers
I have it hanging around for another project and intend to contribute back at some point, but for now: ``` rm -rf SDL2_mixer curl -L https://www.libsdl.org/projects/SDL_mixer/release/ SDL2_mixer-2.0.0.tar.gz | tar xzf - mv SDL2_mixer-2.0.0 SDL2_mixer cd SDL2_mixer emconfigure ./configure

Re: arc4random

2017-09-18 Thread Dirk Vanden Boer
I commented out the arc4random: 'rand', line in library.js This causes the expat configure to not find arc4random and the build succeeds. Why are you providing the arc4random definition if it is not part of the c standard library? Bsd compatibility? On Monday, September 18, 2017 at 5:32:48

Re: Firefox: Module.asm is undefined

2017-09-18 Thread Dirk Vanden Boer
Indeed, the working html file solved all the issues. On Monday, September 18, 2017 at 2:55:24 PM UTC+2, jj wrote: > > The Module object definitely needs to exist before including the main > .js file, otherwise the startup sequence won't connect to the right > object. I.e. the "Html file

Re: Spliting one WASM into several Side Module

2017-09-18 Thread Alon Zakai
That could work, but I just want to warn you again that this hasn't been optimized or tested much yet, so it's risky. You may need to work around the current limitations. Eventually, the goal is to make this work as well as dynamic linking does in native builds, but we are not there yet. On Sun,

Re: Spliting one WASM into several Side Module

2017-09-18 Thread Wonsuk Jung
Thanks for the reply. I tried to remove API's in IDL and it worked. However, if I try to apply several Side Modules technic on large size library(maybe more than 1gb?) do you think that would give me some advantage on loading or size, even with current dynamic linking issue? Of cource, we

Re: Firefox: Module.asm is undefined

2017-09-18 Thread Alon Zakai
Thanks for the testcase, now I see. Yeah, it's indeed the order of those HTML elements. We should make this easier to debug, I opened https://github.com/kripken/emscripten/pull/5595 with two improvements - first, to not capture Module unnecessarily in wasm startup (this just made debugging