axodotdev / axodotdev/cargo-dist
Support for custom commands using cargo
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
I want to use [cargo-pgo](https://github.com/Kobzol/cargo-pgo) in my project to optimize the final binary. This requires using cargo-pgo first to build an instrumented binary, then run it against some data, then rebuild it with the data collected when running the instrumented binary.
It's currently not possible to pass `build-command` for a Cargo package, so I couldn't figure out how to make `dist build` run a custom command to build the binary. I am currently working around this with a `dist.github-build-setup` that sets RUSTFLAGS, but this is quite hacky, and is not scalable to other types of custom commands.
Contributor guide
Research direction
Start at the dist build path for Cargo packages and trace how build-command is handled, then compare it with the existing dist.github-build-setup workaround. Define what custom command stages must be supported for cargo-pgo's instrument, run, and rebuild flow, and verify that dist build can complete the requested workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100