>
>
>    1. Is it possible for 2 separately compiled .wasm packages to use the 
>    same HEAP8, possibly by not modularizing them? This would be to avoid data 
>    copies between the packages.
>
> I'm also interested in having a core of a system that pulls in "DLLs" 
later that can access the same HEAP8.

It seems that there is some support for DLLs/.so ... which means being able 
to share pointers with the code that loaded them (hence same heap):

https://github.com/emscripten-core/emscripten/wiki/Linking

This makes use of something called "SIDE_MODULE" which is a more basic form 
of compilation that doesn't include system libraries, and you attach it to 
some heap that's already around, or that you create.  You can also use this 
to make more bare-bones WASM code that doesn't have all of emscripten's 
overhead, a (possibly outdated) demo is here:

https://blog.scottlogic.com/2017/10/17/wasm-mandelbrot.html 
 
The page points out a problem I'd wondered about trying to use a 
SIDE_MODULE:

"The one tricky aspect to this design is that a side module might need a 
system library that the main doesn't know about."

So it looks like you might wind up having to make a fairly "fat" main 
module if you want to cover the contingencies of arbitrary SIDE_MODULEs 
that came along later.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/c2aaabd8-4a92-409c-9678-c0249e1c64bfn%40googlegroups.com.

Reply via email to