Wasm-pack: Cargo workspaces not supported

Created on 23 Dec 2018  路  2Comments  路  Source: rustwasm/wasm-pack

馃悰 Bug description

wasm-pack test works with Cargo workspaces, if I specify the path to my to be tested lib, but wasm-pack build throws an error, that target/wasm32-unknown-unknown/release/wasm_module.wasm can not be found.

Part of command output:

  [8/9] wasm-bindgen already installed...
  [9/9] Running WASM-bindgen...
  error: failed to read `target/wasm32-unknown-unknown/release/wasm_module.wasm`
|   caused by: No such file or directory (os error 2)
Running the wasm-bindgen CLI
Caused by: Process exited with exit code: 1: `wasm-bindgen` did not exit successfully.

stdout:

stderr:

error: failed to read `target/wasm32-unknown-unknown/release/wasm_module.wasm`
    caused by: No such file or directory (os error 2)

馃 Expected Behavior

Both commands should work.

馃憻 Steps to reproduce

  • Create a Cargo workspace, and add a project derived from the project template to it.
  • Run wasm-pack build in the workspace root directory.

馃實 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.5.1
rustc version: rustc 1.31.1 (b6c32da9b 2018-12-18)

Most helpful comment

hi! current master, which will become 0.6.0 soon, has a fix for this. you can install from master by running cargo uninstall wasm-pack && cargo install wasm-pack --git https://github.com/rustwasm/wasm-pack/. will close as this is fixed, and just waiting on release.

All 2 comments

Duplicate of #252

hi! current master, which will become 0.6.0 soon, has a fix for this. you can install from master by running cargo uninstall wasm-pack && cargo install wasm-pack --git https://github.com/rustwasm/wasm-pack/. will close as this is fixed, and just waiting on release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikedilger picture mikedilger  路  3Comments

rbtcollins picture rbtcollins  路  3Comments

pablosichert picture pablosichert  路  4Comments

turboladen picture turboladen  路  4Comments

TorstenStueber picture TorstenStueber  路  3Comments