Skip to content

feat(cli): add --example flag#623

Merged
rocketman-code merged 1 commit intomainfrom
feat/example-target-clean
Apr 19, 2026
Merged

feat(cli): add --example flag#623
rocketman-code merged 1 commit intomainfrom
feat/example-target-clean

Conversation

@rocketman-code
Copy link
Copy Markdown
Owner

Summary

  • Add --example flag to piano build and piano profile, mutually exclusive with --bin
  • Generalize find_bin_target to find_target accepting a target kind parameter
  • Update build_instrumented to accept CargoTarget enum for cargo flag dispatch
  • Extend find_latest_binary to scan target/piano/release/examples/
  • Add unit test for example target discovery

Test plan

  • piano profile --example clock on rake-core produces correct profiling output
  • All 356 unit tests pass
  • All integration tests pass
  • --bin and --example mutually exclusive via clap conflicts_with

Support cargo example targets via --example flag, mutually exclusive
with --bin. Generalize find_bin_target to find_target accepting a
target kind parameter. Update build_instrumented to accept CargoTarget
enum (Bin or Example). Extend find_latest_binary to scan the examples
subdirectory. Add unit test for example target discovery.
@rocketman-code rocketman-code force-pushed the feat/example-target-clean branch from 7eb2b78 to 7905534 Compare April 19, 2026 03:07
@rocketman-code rocketman-code merged commit dc88efd into main Apr 19, 2026
11 checks passed
@rocketman-code rocketman-code deleted the feat/example-target-clean branch April 19, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant