Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wasmExports instead of obsolete asm. #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

darkstarx
Copy link

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