axodotdev / axodotdev/cargo-dist
properly handle platform-specific hyphen-remapping
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
Filing before I forget..!
Cargo/rustc have a bunch of machinery for renaming some artifacts to change hyphens to underscores, and if you mess it up then system debuggers won't see the debuginfo even if it's sitting right there in the same directory as the binary! We should be aware of these restrictions so we don't lose artifacts and can copy them into places with the right names (right now we clobber them).
This will be especially relevant to #47.
See the various cases in this file where this boolean does or does not get set to true/false: https://github.com/rust-lang/cargo/blob/a393267a286bdb5fa14dc38be9c0254712ea4f74/src/cargo/core/compiler/build_context/target_info.rs#L95
Contributor guide
Research direction
Start by reading the linked Cargo target_info.rs cases around the platform-specific hyphen-remapping boolean, then trace the corresponding artifact-copying paths in cargo-dist. Check how #47 relates to these artifacts and identify where names are currently clobbered. Done means platform-specific artifacts are retained and copied under the names expected by system debuggers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100