Skip to content

Errors related to async wasm instantiation should be more friendly #5346

@dschuff

Description

@dschuff

If you try to call ccall/cwrap on a module before the wasm module is finished instantiating, you get an error that 'Runtime.stackSave' is not a function (cwrap itself of course can't work because the C function isn't there yet but stackSave is the first thing that will fail). I'd bet there's some module-level var that means "the wasm is instantiated or is still compiling" and we should query that it some of the obvious entry points like ccall to make that error friendlier, because this is likely to be a common issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions