Skip to content

Upgrade wasm-bindgen so initSync is generated #42

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylecarbs
Copy link

@kylecarbs kylecarbs commented Jan 30, 2025

It seems like adding wasm-opt = false is perfectly fine. With it, we get an error:

[parse exception: Only 1 table definition allowed in MVP (at 0:2303)]
Fatal: error in parsing input
Error: failed to execute `wasm-opt`: exited with exit status: 1
  full command: "/home/kyle/.cache/.wasm-pack/wasm-opt-4d7a65327e9363b7/wasm-opt" "/home/kyle/projects/kylecarbs/brotli-wasm/pkg/brotli_wasm_bg.wasm" "-o" "/home/kyle/projects/kylecarbs/brotli-wasm/pkg/brotli_wasm_bg.wasm-opt.wasm" "-O"
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

I haven't spent time investigating why this fails, so possible the fix is simple.

@CLAassistant
Copy link

CLAassistant commented Jan 30, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@pimterry pimterry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kylecarbs, thanks for the contribution!

Looks like the build is failing, can you take a look? Seems this breaks usage in webpack somehow.

Since you haven't actually modified the entrypoints here, I assume this you're accessing the initSync method by directly importing the built internals, is that right?

If you can share details about your setup that would be interesting, it feels like we're rapidly coming towards a moment where the entrypoints to this package need updating to better match the current ecosystem & import patterns. We do need to support Webpack still, so these tests should pass, but better support for Vite et al and other runtimes would be very valuable as well.

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.

3 participants