-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-environment-variablesArea: environment variablesArea: environment variablesA-workspacesArea: workspacesArea: workspacesC-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
T-cargo notes:
Potential use cases:
- Accessing workspace-wide assets (this issue)
- Looking up
file!
at test runtime, see A way for tests to look upfile!
paths at runtime #15885 - Finding a binary's path, see
- Looking up the lockfile, this would be insufficient because the lockfile path can be overridden. A new issue for this would be needed.
- Dependencies looking up information in your workspace: side-banned communication like this is rejected by the cargo team
Updates
- Environment variable for Cargo Workspace for finding workspace-wide assets #3946 (comment)
- Environment variable for Cargo Workspace for finding workspace-wide assets #3946 (comment)
Hi, while working on using workspace in html5ever, I've ran into issue of needing the CARGO_WORKSPACE
directory, and being unable, to find it. What I resorted to is essentially, &Path(cargo_manifest).join("..")
which feels hacky.
Could CARGO_WORKSPACE
be added as environment variable? I'm not sure what it should be when there is no workspace defined, I assume it should either return Err
or default it to CARGO_MANIFEST_DIR
.
Sidenote I'm willing to work on this issue, if I could get quick pointers, to what I need to do.
DrSensor, SOF3, jgrund, njam, Veetaha and 72 moreguilhermewerner, bobbbay, quambene, luiseduardobrito, filiptibell and 4 more
Metadata
Metadata
Assignees
Labels
A-environment-variablesArea: environment variablesArea: environment variablesA-workspacesArea: workspacesArea: workspacesC-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.