You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there's no easy way to trim the path prefix when compiling.
rustc has --remap-path-prefix but this requires you to know the prefix. This is hard to know when using build systems and you can't expect users to have this set when distributing source.
Describe the solution you'd like
I believe we should copy Go:
The new go build flag -trimpath removes all file system paths from the compiled executable, to improve build reproducibility.
With a trimpath option in cargo.toml. This would pass --remap-path-prefix=$CARGO_MANIFEST_DIR=/ to rustc.
This could also perhaps be enabled by default on release builds.
Notes
The text was updated successfully, but these errors were encountered:
Describe the problem you are trying to solve
Currently there's no easy way to trim the path prefix when compiling.
rustc has
--remap-path-prefix
but this requires you to know the prefix. This is hard to know when using build systems and you can't expect users to have this set when distributing source.Describe the solution you'd like
I believe we should copy Go:
With a
trimpath
option in cargo.toml. This would pass--remap-path-prefix=$CARGO_MANIFEST_DIR=/
to rustc.This could also perhaps be enabled by default on release builds.
Notes
The text was updated successfully, but these errors were encountered: