Allow omitting default binary target
RagnarGrootKoerkamp opened this issue · comments
Ragnar Groot Koerkamp commented
The readme indicates that cargo flamegraph
is equivalent to cargo run --release
. However, in my project with multiple binary targets it gives the following error:
Error: several possible targets found: [BinaryTarget { package: "astar-pairwise-aligner", target: "astar-pairwise-aligner", kind: ["bin"] }, BinaryTarget { package: "astar-pairwise-aligner", target: "proof", kind: ["bin"] }, BinaryTarget { package: "astar-pairwise-aligner", target: "generate_dataset", kind: ["bin"] }], please pass an explicit target.
It would be convenient to run the default binary (ie the name of the crate / the one set as default-run
in cargo.toml
).
Additionally it would be nice to allow the --release
flag as a no-op, so that swapping run
for flamegraph
in cargo run -r -- <flags>
just works.
Dirkjan Ochtman commented
Sounds good. Would you be able to contribute a PR?