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

[BUG] failed to generate bindings for import #1603

Closed
Pauan opened this issue Jun 17, 2019 · 1 comment · Fixed by #1606
Closed

[BUG] failed to generate bindings for import #1603

Pauan opened this issue Jun 17, 2019 · 1 comment · Fixed by #1606
Labels

Comments

@Pauan
Copy link
Contributor

Pauan commented Jun 17, 2019

Steps to Reproduce

  1. The code is here

  2. Run npm install

  3. Run npm run build-prod-force

I get this error:

error: failed to generate bindings for import `Closure(Closure { shim_idx: 20, dtor_idx: 21, function: Function { arguments: [Anyref], shim_idx: 20, ret: Unit }, mutable: true })`
    caused by: no function table found in module
Error: Running the wasm-bindgen CLI

This is using the latest wasm-bindgen (0.2.46) and latest wasm-pack (0.8.1)

@Pauan Pauan added the bug label Jun 17, 2019
alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Jun 18, 2019
Recent refactorings of wasm-bindgen have inserted multiple `gc` passes
executed by walrus. In these passes though the function table was being
removed a bit too aggressively because it's not exported by LLD and it's
only later that we realize we need to export it.

To handle this case we add synthetic and temporary exports of the
function table and these exports are removed just after the GC pass in
question.

Closes rustwasm#1603
alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Jun 18, 2019
Recent refactorings of wasm-bindgen have inserted multiple `gc` passes
executed by walrus. In these passes though the function table was being
removed a bit too aggressively because it's not exported by LLD and it's
only later that we realize we need to export it.

To handle this case we add synthetic and temporary exports of the
function table and these exports are removed just after the GC pass in
question.

Closes rustwasm#1603
@alexcrichton
Copy link
Contributor

Oh wow that's a chain of events I wouldn't have expected, should be fixed in #1606!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants