Skip to content
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

Add an install.rs that lets a file perform installation setup, as well as a permanent installation outdir #2386

Closed
Manishearth opened this issue Feb 13, 2016 · 5 comments
Labels
Command-install E-hard Experience: Hard S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@Manishearth
Copy link
Member

Currently, cargo install builds a binary using the regular build script and copies it to .cargo/bin.

In this process we lose the outdir. Which makes sense, since usually that's only needed for compilation.

However, some binaries may need to do extra work on installation, as well as store some data in an output dir. It would be nice if cargo install would run a specified install.rs which has access to an $INSTALL_OUT_DIR variable which is a directory under .cargo/bin which is deleted if empty after installation.

This, for example, makes it possible to run cargo install rust-clippy (clippy needs a place to stash the compiled plugin).

@mbrubeck
Copy link
Contributor

See also #545.

@Luthaf
Copy link

Luthaf commented Mar 31, 2017

I think this could be a solution for both #545 and #2729.

Do we need a full RFC for this? If so, should the rfc go to the main rust-lang/rfcs repository?

@joshtriplett
Copy link
Member

Please see https://github.com/rust-lang/rfcs/2376 for an RFC proposal on this.

@zslayton
Copy link

Please see https://github.com/rust-lang/rfcs/2376 for an RFC proposal on this.

Updated link: rust-lang/rfcs#2376

@weihanglo weihanglo added E-hard Experience: Hard S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. labels May 24, 2023
@epage
Copy link
Contributor

epage commented May 24, 2023

As this is a specific solution to the problem in #2729, I'm closing in favor of #2729. If I missed something about that and we should keep this open, feel free to speak up!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-install E-hard Experience: Hard S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

8 participants