-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo metadata: get build script OUT_DIR #7546
Comments
This may not be possible in a general sense. The OUT_DIR hash depends on quite a few things (target, profile, features, etc.) that may not be available to the |
It's theoretically possible to get this information from anywhere. IntelliJ Rust currently has support for grabbing the path from The important part is that this information is retrievable without having to rebuild any more of the crate graph than if the information was not asked for. As a bonus, being able to find this information without actually building anything would be nice. (An |
This would also be useful for more high-level build systems wrapping cargo (eg. Trunk), when a crate's The Cargo Book states:
Without easy access to the cargo-outdir provides a workaround, but this is an unmaintained third-party crate with a 3y-old |
related: #7178
related: rust-lang/rust-analyzer#1967
cargo metadata
Should add a key to each package that contains the path used for theOUT_DIR
environment variable.The text was updated successfully, but these errors were encountered: