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

build fails when a Cargo.toml exists in a directory above the project #915

Open
john-consumable opened this issue Sep 14, 2020 · 0 comments
Labels
bug Something isn't working needs investigation

Comments

@john-consumable
Copy link

john-consumable commented Sep 14, 2020

🐛 Bug description

wasm-pack build fails with the following when a Cargo.toml exists in a directory above the current.

🤔 Expected Behavior

The webassembly and javascript should have been placed in out/static

👟 Steps to reproduce

To reproduce have two Cargo.toml files like this:

project/Cargo.toml
project/frontend/Cargo.toml

The frontend directory has the wasm target while the one above does not.

frontend/Cargo.toml contains the following lines:

[lib]
crate-type = ["cdylib", "rlib"]

from the frontend directory, run wasm-pack build

The error is this:

Error: crate-type must be cdylib to compile to wasm32-unknown-unknown. Add the following to your Cargo.toml file:

[lib]
crate-type = ["cdylib", "rlib"]

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: git with rev 9f9634ca9ffa9147c044f947a31808f02715aa44
rustc version: 1.46.0

@ashleygwilliams ashleygwilliams added bug Something isn't working needs investigation labels Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants