rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.56k stars 2.38k forks source link

Tracking Issue for trim-paths RFC 3127 #12137

Open ehuss opened 1 year ago

ehuss commented 1 year ago

Summary

RFC: #3127 Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-trim-paths-option Issues: https://github.com/rust-lang/cargo/labels/Z-trim-paths rustc tracking issue: https://github.com/rust-lang/rust/issues/111540

This adds a new profile setting (among other things) to control how paths are sanitized in the resulting binary.

Unresolved Issues

Future Extensions

No response

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Implementation history

epage commented 3 months ago

Last status update I'm aware of

https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/trim-paths.20testing/near/401425246

joshtriplett commented 3 months ago

Is this working on Linux, well enough that we could ship it for Linux without promising macOS support?

weihanglo commented 3 months ago

This is the latest status of it on rustc side: https://github.com/rust-lang/rust/issues/111540#issuecomment-2014748609, which the new remap rule in the conclusion is implemented. I've updated the unresolved issues section in this tracking issue.

weihanglo commented 3 months ago

Status update:

weihanglo commented 3 months ago

https://github.com/rust-lang/rust/pull/107099 is just merged, so should be able to support for rustdoc.

Edit: need to adjust cargo to pass --remap-path-prefix to rustdoc invocations.

weihanglo commented 1 month ago

Updated:

That potentially blocks this, if we would like to see -Ztrim-paths supports also for rustdoc invocations.

liciana24 commented 1 month ago

Updated:

That potentially blocks this, if we would like to see -Ztrim-paths supports also for rustdoc invocations.

both of those linked are closed/merged what is left blocking to get trimpaths working?

weihanglo commented 1 month ago

both of those linked are closed/merged what is left blocking to get trimpaths working?

@liciana24 There are some unresolved issues listed in the PR description I just updated.

It should minimally work. Any feedback of it not working?