-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo install doesn't follow workspace target #5662
Comments
Hm can you describe a bit more precisely what you're executing with |
Sorry could've been more clear. Using wasm-bindgen as an example, Executing The expectation is that
|
Ok that definitely sounds like a bug! Given a crate in an existing workspace I'd also expect the workspace's general build settings and target directory to get used. |
…tklad Fix `cargo install` using a workspace target dir Closes #5662
I'm following this book here: https://doc.rust-lang.org/book/second-edition/ch14-03-cargo-workspaces.html
and
cargo build
works as described. Howevercargo install
doesn't work in the workspace level, and at crate level it tries to recompile the binary to atarget
folder within the crate folder instead of using the workspace leveltarget
folder.cargo build
from a workspace level also sometimes compiles things differently fromcargo install
from the crate. I was trying to compile pijul on Windows earlier and while workspace levelcargo build
completes successfully,cargo install pijul
(as well ascargo install
from pijul crate) results in a bunch missing trait implementation errors.In comparison
cargo run
doesn't have this problem as it uses the executables from workspace level target folder. (Although it'd be nice ifcargo run
can be used from workspace root directly instead of at crate folder)The text was updated successfully, but these errors were encountered: