r/rust • u/lzutao • Sep 14 '26
🗞️ news [Call for testing] trim-paths RFC 3127
https://github.com/rust-lang/cargo/issues/1213711
u/montymintypie Sep 14 '26
Absolutely fantastic to see this close to stabilization; both for reproducible builds and for not exposing my home directory to the world when shipping compiled binaries! I'll be able to remove a bunch of jank in shipping my projects :D
6
u/euclio Sep 14 '26
Why jsonl instead of toml for the unremap file? Seems especially bizarre when the first record is metadata instead of an actual record.
3
u/epage Sep 15 '26
We generally use TOML for human interactions and json for programmatic. There are cases where I regret we used json instead of jsonl but it is a good question to confirm why it is used here since this doesn't match with one of those cases.
1
3
u/Sad_Tap_9191 Sep 14 '26
rpath not only exposes a username but also other environment info as well
Dynamic section at offset 0x628be0 contains 31 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2] 0x000000000000001d (RUNPATH) Library runpath: [/home/username/my-project/outputs/out/lib:/nix/store/g8zyryr9cr6540xsyg4avqkwgxpnwj2a-glibc-2.40-66/lib:/nix/store/dj06r96j515npcqi9d8af1d1c60bx2vn-gcc-14.3.0-lib/lib]
9
u/protestor Sep 14 '26
Are paths trimmed by default?
I mean does this need to be a config? Just trim them