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

init no longer called in bundle? #1230

Open
cryptoquick opened this issue Feb 17, 2023 · 1 comment
Open

init no longer called in bundle? #1230

cryptoquick opened this issue Feb 17, 2023 · 1 comment

Comments

@cryptoquick
Copy link

🐛 Bug description

We've been trying to figure out what's causing an error detailed in this thread: rustwasm/wasm-bindgen#3306

In particular, the issue is that functions imported from binaries generated from wasm-pack build --target bundler fail to run when called, and instead return the error Undefined __wbindgen_malloc.

🤔 Expected Behavior

A bundle is returned where functions are called that run without malloc errors.

👟 Steps to reproduce

The code I'm trying to run is deployed here: https://unpkg.com/browse//bitmask-core@0.5.0/

When bundled with webpack, and a function is imported and called, the above error occurs. The error goes away if init is called and awaited from the web target, but init is not returned as a default export by the bundler in a similar way.

🌍 Your environment

Arch Linux 6.1.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 01 Feb 2023 17:07:37 +0000 x86_64 GNU/Linux
rustc 1.67.0 (fc594f156 2023-01-24)
wasm-pack 0.10.3

@tombelieber
Copy link

same here

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

No branches or pull requests

2 participants