True, the .so would contain asm.js in one case and wasm in the other.
Perhaps we could add a clearer error on it.

On Sat, Feb 2, 2019 at 4:10 AM Beuc <[email protected]> wrote:

> What am I saying, the same .so files are not compatible between asmjs and
> wasm.
>
> - Beuc
> On 02/02/2019 12:43, Beuc wrote:
>
> Thanks, I linked the doc in the wiki.
>
> One issue though: if one loads the same the same data file from an asmjs
> alternate build, this makes dlopen fail.
> Perhaps preloading .so files should be inhibited in that case.
>
> - Sylvain
> On 02/02/2019 04:01, Alon Zakai wrote:
>
> There are some workarounds here, which might help in some cases. One is to
> preload the library files, then the loader code will compile them
> asynchronously before the main program runs. Basically just preloading the
> files normally will work, if they have the suffix ".so", see
> https://github.com/emscripten-core/emscripten/blob/incoming/src/library_browser.js#L233
>
> Another option is to call loadWebAssemblyModule manually, and pass it
> loadAsync: true, like the plugin does in the above link.
>
> Thanks for helping document this!
>
> On Fri, Feb 1, 2019 at 3:22 PM Beuc <[email protected]> wrote:
>
>> Hi,
>>
>> When experimenting with dlopen() I remembered that Chromium doesn't
>> support compiling non-trivial WASM on the main thread, and consequently
>> dlopen() is unusable:
>>
>> RangeError: WebAssembly.Compile is disallowed on the main thread, if the
>> buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a
>> worker thread.
>>
>> I added a note at
>> https://github.com/emscripten-core/emscripten/wiki/Linking
>> Is there a work-around to document (aside from moving everything to a
>> worker, which is not practical)?
>>
>> - Beuc
>>
>> --
>> 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].
>> 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 [email protected].
> 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 [email protected].
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to