I think the thing we really want to fix here is the fact the async
compilation is disabled under certain circumstances.  For projects of
any reasonable size we want to always be doing async compiles, which
will fix the issue on chrome.  I'm not sure exactly which combination
of flags trigger "BINARYEN_ASYNC_COMPILATION disabled due to user
options" but we should work to remove this limitation.
On Fri, Oct 5, 2018 at 2:35 AM Sylvain <[email protected]> wrote:
>
> Hi,
>
> Due to using EMULATE_FUNCTION_POINTER_CASTS (required for Python) I get when 
> compiling:
> BINARYEN_ASYNC_COMPILATION disabled due to user options. This will reduce 
> performance and compatibility (some browsers limit synchronous compilation)
>
> This indeed causes an error in Chrome:
> failed to compile wasm module: 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.
> Assertion failed: no binaryen method succeeded.
>
> Currently I have an alternate version compiled in asmjs (with decreased 
> perf), and I blindly redirect to it when I detect Chrome.
>
> - Assuming Chrome fixes this later, is there a way to cleanly catch this "no 
> binaryen method succeeded"?
>
> - Incidentally, what would be required to make EMULATE_FUNCTION_POINTER_CASTS 
> compatible with Chrome wasm?
>
> Cheers!
> 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.

Reply via email to