Closed
Description
🐛 Bug description
wasm-pack do not find the correct target/
folder when using a root level Cargo.toml to define a multi crate work space
🤔 Expected Behavior
It should find the files where the work space put the. In the target folder on the root level.
👟 Steps to reproduce
Set up a workspace whit multiple crates. One of them having a wasm target. Try to compile
[1/9] Checking `rustc` version...
[2/9] Checking crate configuration...
[3/9] Adding WASM target...
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
[4/9] Compiling to WASM...
Compiling id_generator v0.1.0 (<redacted>/id_generator)
Finished release [optimized] target(s) in 0.27s
[5/9] Creating a pkg directory...
[6/9] Writing a package.json...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[7/9] Copying over your README...
:-) [WARN]: origin crate has no README
wasm-bindgen 0.2.31 (b04f60cf2)
[8/9] wasm-bindgen already installed...
[9/9] Running WASM-bindgen...
error: failed to read `target/wasm32-unknown-unknown/release/id_generator.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/id_generator.wasm`
caused by: No such file or directory (os error 2)
The file can be found at ../target/wasm32-unknown-unknown/release/id_generator.wasm
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.5.1
rustc version: 1.31.1 (b6c32da9b 2018-12-18)
Metadata
Metadata
Assignees
Labels
No labels