3 ms·
If what I want is not an executable but a shared library, does this get me anything? I currently have a use case that uses a server running an emscripten build
by legobmw99 2y ago
If what I want is not an executable but a shared library, does this get me anything?
I currently have a use case that uses a server running an emscripten build (using SMODULARIZE and some exports, I suppose it’s not a true dylib)
- Muromec 2y agoImporting a wasm module from a wasm module is (non)surprisingly impossible to do -- you have to have a linker, abi and all that.
- okwhateverdude 2y agoIt is possible provided some care. I was looking into this with WAForth which compiles the wasm and loads it via a host function (ie. it is the hosts responsibility to make it available). I wanted to enable dynamic loading of words from disk which requires some book keeping and shuffling a bunch of bytes around during compilation to write out the bits necessary to have the host do that linking. It isn't impossible to do, just tedious and in my case, having to write it in WAT is a pain.
- Muromec 2y agoYep, you need to do the nasty bits by hand, that's what I mean.