Skip to content

WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. #74

@motorina0

Description

@motorina0

Currently the WebAssembly part is loaded synchronously:

const mod = new WebAssembly.Module(binary);
const instance = new WebAssembly.Instance(mod, imports);

This results in the following error:
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.

However the async version of the methods cannot be run on the top-level file AFAIK.
Any ideas how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions