Skip to content

Use wasmExports instead of obsolete asm.#11

Open
darkstarx wants to merge 3 commits intoEP-u-NW:masterfrom
darkstarx:master
Open

Use wasmExports instead of obsolete asm.#11
darkstarx wants to merge 3 commits intoEP-u-NW:masterfrom
darkstarx:master

Conversation

@darkstarx
Copy link
Copy Markdown

It's related to #10.

New versions of Emscripten declares the Model.asm as deprecated and generates the getter asm which aborts with corresponding message:

legacyModuleProp('asm', 'wasmExports');
...
function legacyModuleProp(prop, newName, incomming=true) {
  if (!Object.getOwnPropertyDescriptor(Module, prop)) {
    Object.defineProperty(Module, prop, {
      configurable: true,
      get() {
        let extra = incomming ? ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)' : '';
        abort(`\`Module.${prop}\` has been replaced by \`${newName}\`` + extra);

      }
    });
  }
}
...
missingGlobal('asm', 'Please use wasmExports instead');

So, to keep old versions of Emscripten supported as well as new versions, this PR is offered.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant