Re: Share the same memory space between modules

2018-10-28 Thread nicktasios
I see, that's what I'm doing currently. It would be nice if there was an easier way of achieving this, though. It would then make it easier to reuse and share modules. On Wednesday, October 24, 2018 at 12:09:15 AM UTC+2, Alon Zakai wrote: > > The best option is usually to compile multiple progra

Re: Share the same memory space between modules

2018-10-23 Thread Alon Zakai
The best option is usually to compile multiple programs together, that is, compile the sources into one executable. This may take some refactoring though, and may not always be practical. But if you can do that, then you just export the various functions and can then call them from JS, and they wil

Share the same memory space between modules

2018-10-23 Thread nicktasios
If I understand correctly, if I want to use multiple Emscripten-compiled modules in the same script, I have to pass the `-s MODULARIZE=1` option, and instantiate the modules using the promise-like syntax. How can I make these modules share the same memory space, or pass pointers from one module