Skip to content

There should be a way to abort wasm compilation #1262

Description

@chicoxyzzy

Compilation (and instantiation?) of WebAssembly module could be a resource intensive operation so there should be a way for wasm hosts to abort this step in cases when module is not needed anymore for some reasons.
As for JS hosts, theoretically cancellation methods should be in JS API, but JS doesn't have cancellation mechanism for promises yet. There are AbortController and AbortSignal which are used to abort Fetch. Probably they can be used to abort wasm compilation (passing signal as extra parameter to WebAssembly.compile), but they are part of DOM WHATWG spec, so it's only possible to use them in browsers and as a consequence only in Web API.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions