-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Allow build scripts to stage final artifacts #13663
Copy link
Copy link
Open
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
i was trying to create an idiomatic template that uses
clap_completewithinbuild.rsin order to generate and install shell completions, when i realized it is basically impossible.because
cargo installonly installs binaries, you have to use a Makefile, which is fine, but there's a problem:build.rsis only supposed to create files under$OUT_DIR$OUT_DIRis not easily accessible to outside programsProposed Solution
$CARGO_TARGET_DIR(or a fixed subdir thereof, such astarget/release/aux)(low priority) add a(see Support installing manpages (and potentially other files) #2729)cargo::installinstruction that allows directingcargo installto install files relative to a configured prefix (eg..local,/usr, or/usr/local). usingcargo::install=$OUT_DIR/CMDNAME.bash=share/bash/bash-completions/completions/CMDNAMEwould install the completion in the specified completion dir.Notes
No response