Description
Problem
Currently, "bin"
is always suffixed onto the root
, meaning it's really hard when trying to deal with installing binaries from a project into a separate directly, that's not specifically bin
(for example, if I have a video related tool, I might install it into $root/bin-video
, and $root/bin-audio
for an audio related tool, and so on).
I currently have to do something like
cargo build --release ...
install -D -p target/*/release/*.exe "$root/bin-video"
and that's not very desirable and very fragile.
I tried looking to see if a similar issue existed, but could not find anything yet.
Proposed Solution
One solution would be to add a flag to cargo install
that would take a relative path to --root
, and if not provided, default to "bin"
, and that would be used in the below code locations instead of the current contant strings.
cargo/src/cargo/ops/cargo_install.rs
Line 78 in 6b8e192
cargo/src/cargo/ops/cargo_install.rs
Line 567 in 6b8e192
cargo/src/cargo/ops/cargo_install.rs
Line 279 in 6b8e192
So, something like --root /mycustomprefix --bindir bin-video
would install the executables into /mycustomprefix/bin-video
instead of /mycustomprefix/bin
Notes
No response