Environment variable for Cargo Workspace for finding workspace-wide assets
T-cargo notes: Potential use cases: - Accessing workspace-wide assets (this issue) - Looking up `file!` at test runtime, see #15885 - Finding a binary's path, see - [`CARGO_BIN_EXE_<name>`](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) - #9661 - 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 - https://github.com/rust-lang/cargo/issues/3946#issuecomment-1402464796 - https://github.com/rust-lang/cargo/issues/3946#issuecomment-3224923131 --- 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. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"yerke"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
Posted by Ygg01 on Apr 24, 2017, 9:45 AM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Environment variable for Cargo Workspace for finding workspace-wide assets
T-cargo notes: Potential use cases: - Accessing workspace-wide assets (this issue) - Looking up `file!` at test runtime, see #15885 - Finding a binary's path, see - [`CARGO_BIN_EXE_<name>`](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) - #9661 - 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 - https://github.com/rust-lang/cargo/issues/3946#issuecomment-1402464796 - https://github.com/rust-lang/cargo/issues/3946#issuecomment-3224923131 --- 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. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"yerke"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
Comments (0)
No comments yet. Start the discussion.