Closed as not planned
Description
Let's say when building your executable for release, you have this goal: Maximum privacy, strip all paths associated with the build machine from the release executable. Requirements:
- it should be doable with no cmd line flags (just a fixed
.cargo/config
) - it should work regardless of which machine the build is done on
- it should work regardless of what the path to the project is on the build machine
- it should not require mentioning paths from a specific build machine in any file in the repo (like
.cargo/config
)
remap-path-prefix-from
requires specifying the path to the project. There are 2 problems with it:
- It's very user-unfriendly, if all someone wants is to just maximum privacy when releasing a binary.
- It requires specifying the absolute path that should be hidden from the exe, which depends on the folder structure of the build machine, thus it can't be done with a fixed
.cargo/config
.
It would be better to have an option that:
- Is easier to use when the goal is maximum privacy.
- Works independently of the path to the project folder on every build machine that it's run on, not requiring to specify the path. It should be inferred.
It could look like this: --strip-path-prefix
and it behaves like remap-path-prefix-from
set to the path to the project and remap-path-prefix-to
set to the empty string.
If this is too much to ask, as an alternative, it should be possible to pass a placeholder to remap-path-prefix-from
that always means "the project's path", so that it can be used inside .cargo/config
, agnostic to the build machine / project path.
Metadata
Metadata
Assignees
Labels
Area: rustc_driver that ties everything together into the `rustc` compilerArea: Reproducible / deterministic buildsCategory: An issue proposing an enhancement or a PR with one.Category: A feature request, i.e: not implemented / a PR.Relevant to the cargo team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.