Post cargo install
hook
#11539
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Problem
I'm building a Rust binary that relies on a second binary1 that the first one executes. I have the
build.rs
file that builds this second binary and places it next to the Rust binary. However, when I runcargo install
, if I'm understanding this correctly, the Rust binary is first built then copied into the installation root. Is there a way to execute some code after cargo install that moves the second binary to the installation root as well?Proposed Solution
Either a way of detecting in build.rs that we are running
cargo install
(maybe an environment variable?), or some sort of post-install hook that can let users customize thecargo install
process.Notes
No response
Footnotes
I can't link the two programs because of complicated issues. ↩
The text was updated successfully, but these errors were encountered: