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

Upgrading from 0.2.93 to 0.2.95 appears to newly build wasm modules with multiple tables, breaking wasm2js #4234

Closed
fishface60 opened this issue Oct 29, 2024 · 2 comments
Labels

Comments

@fishface60
Copy link

Describe the Bug

When using 0.2.95 the wasm builds differently to 0.2.93.

wasm2js -o bundle/src/mt_gurps_bg.wasm.js pkg/mt_gurps_bg.wasm
Fatal: error: modules with multiple tables are not supported yet.

This works in 0.2.93. I assume something changed that causes the emitted wasm to be different enough that wasm2js can no longer handle it.

This may be fixed in a newer version of binaryen, but Ubuntu 24.04 LTS and Debian stable are on 108-1

Steps to Reproduce

  1. Clone https://gitlab.com/richardmaw/mt-gurps
  2. Change the wasm-bindgen dependency in crates/mt_gurps/Cargo.toml to 0.2.95
  3. Observe the error displayed above

See https://gitlab.com/richardmaw/mt-gurps/-/jobs/8215439401 for a CI run with the failure.

Expected Behavior

Allowing wasm-bindgen to continues to work with a stable released version of binaryen.

Actual Behavior

It somehow produces incompatible wasm.

@fishface60 fishface60 added the bug label Oct 29, 2024
@fishface60
Copy link
Author

If a newer binaryen fixes this I'm happy for the issue to be closed and I'll wait for a distro stable release with the new version before updating wasm-bindgen.

@daxpedda
Copy link
Collaborator

daxpedda commented Nov 7, 2024

I believe that this is related to the reference types proposal being enabled by default in Rust v1.82, which causes wasm-bindgen to apply its reference type transformations as well, which introduces multiple tables.

Let me know if I'm wrong about that.

Duplicate of #4211.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants