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

fix: use generated binary path from cargo instead #1421

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

Conversation

zebp
Copy link

@zebp zebp commented Aug 18, 2024

Previously when we'd invoke wasm-bindgen we'd assume that the binary we wanted to process was target/wasm32-unknown-unknown{debug|release}/crate.wasm, which isn't the case for all flags that Cargo accepts.

My goal with this is to allow people to call #[wasm-bindgen] functions compiled under --tests outside of wasm-pack test since I'm working on a test runner for an environment not supported by wasm-pack (cloudflare workers).

Fixes #1410

Previously when we'd invoke wasm-bindgen we'd assume that the binary we wanted
to process was `target/wasm32-unknown-unknown{debug|release}/crate.wasm`, which
isn't the case for all flags that Cargo accepts.
@zebp zebp force-pushed the zeb/correct-wasm-binary branch from bc4a4c6 to ec2411c Compare August 18, 2024 00:37
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.

wasm-pack runs wasm-bindgen on wrong binary for certain cargo flags
1 participant