cargo install
uses my project's .cargo/config
target triple and it shouldn't?
#5441
Labels
cargo install
uses my project's .cargo/config
target triple and it shouldn't?
#5441
TL;DR: I spent multiple hours trying to figure out why I couldn't
cargo install
some tools. It turned out that the reason I couldn't was because, unbeknownst to me,cargo install
was trying to build the tools for the wrong target due to.cargo/config
in my project directory!Full explanation
.cargo/config
file to build for a wasm target triple since my project is wasm only:I ran
cargo install cargo-web
from my project's working directory. It failed due to a bunch of obscure errors about dependencies being unable to compile. This made me think the dependencies had been really broken, which gave me a really sour taste in my mouth for Rust.After cloning the dependencies and trying to fix them, I finally realized:
cargo install cargo-web
is for some reason building forwasm32-unknown-emscripten
on my system! 😢As it turned out,
cargo install
is respecting my project's.cargo/config
target triple.What I expected
I think that
cargo install
should ignore the target triple specified in a project directory.I imagine that at some point or another, most users developing projects primarily targeting wasm/asmjs will run into this issue, and it is incredibly annoying to debug.
I'm using:
The text was updated successfully, but these errors were encountered: