axodotdev / axodotdev/cargo-dist

Support for custom commands using cargo

Open
#2,264 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.