-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
My project broke with the latest versions of wasm-pack and wasm-bindgen #3376
Comments
I doubt that Was it specifically the latest version of Also, although you can't share any code, can you give some basic info about the setup you're using? Specifically, which |
I updated both wasm-pack and wasm-bindgen at the same time so I'm not sure. This is the actual build command:
The compilation target is wasm32-unknown-unknown and this is in
|
The thing that's jumping out to me there is If that's the issue, |
Okay Thanks a lot for your help, that is promising. Indeed, a prior step in my build process is to install wasm-bindgen-cli locally into the build box. Below is the output of the wasm-pack step. It's not quite like that other issue you linked to. It says it's skipping wams-opt. Is there a way to force it not to skip wasm-opt? What is wasm-opt? If it's being skipped and not crashing, could that still be the source of the issue?
|
I think you're right that this has to do with the |
Alright this is resolved, my company's internal build tools stopped passing a flag to CLang that it needed. |
Summary
Without making any code changes, only having updated my deps, my wasm project no longer works. None of my Rust functions that are decorated with the
#[wasm_bindgen]
annotation are being exported to JS any more. They don't show up in my generated.js
file and their declarations don't show up inside my.d.ts
file either.Can someone please tell me if there's a new flag I need to use in order for these functions not to be tree-shaken or something? Perhaps set the sideEffects property to true?
I can't post the source code because it's for work, but literally nothing changed and now the generated code inside
/pkg
doesn't have any of the stuff i want to convert with wasm-bindgen.Additional Details
I saw something that seemed related in a PR in rust-wasm (1224).
I for the life of me cannot find documentation on how to set this
sideEffects
property to true.The text was updated successfully, but these errors were encountered: