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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-pack does not understand overriden target-dir #1349

Open
fzyzcjy opened this issue Nov 25, 2023 · 0 comments
Open

wasm-pack does not understand overriden target-dir #1349

fzyzcjy opened this issue Nov 25, 2023 · 0 comments

Comments

@fzyzcjy
Copy link

fzyzcjy commented Nov 25, 2023

馃悰 Bug description

Hi thanks for the tool! However, it seems that wasm-pack does not understand overriden target-dir.

馃 Expected Behavior

no error

馃憻 Steps to reproduce

  1. make a cargo workspace, and one or many cargo crate in it
  2. in your crate, set .cargo/config.toml to:
[build]
target-dir = "target"
  1. Run wasm-pack build in that crate

Then get:

error: failed reading '/Volumes/MyExternal/ExternalRefCode/flutter_rust_bridge/target/wasm32-unknown-unknown/debug/frb_example_pure_dart.wasm'

Caused by:
    No such file or directory (os error 2)
Error: Running the wasm-bindgen CLI
Caused by: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 1
  full command: "/Users/tom/.cargo/bin/wasm-bindgen" "/Volumes/MyExternal/ExternalRefCode/flutter_rust_bridge/target/wasm32-unknown-unknown/debug/frb_example_pure_dart.wasm" "--out-dir" "/Volumes/MyExternal/ExternalRefCode/flutter_rust_bridge/frb_example/pure_dart/web/pkg" "--no-typescript" "--target" "no-modules" "--out-name" "frb_example_pure_dart" "--debug"

  Command: wasm-pack build -t no-modules -d /Volumes/MyExternal/ExternalRefCode/flutter_rust_bridge/frb_example/pure_dart/web/pkg --no-typescript --out-name frb_example_pure_dart --dev rust -- -Z build-std=std,panic_abort

It seems that wasm-pack is trying to find the files inside the workspace's target dir, while we have overriden the settings such that the .wasm is indeed generated in the custom directory.

馃實 Your environment

Include the relevant details of your environment.
wasm-pack version: latest
rustc version:

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

1 participant