Add --version support across VDF/HW CLIs#314
Merged
Merged
Conversation
Introduce a shared version printer for vdf and HW client/test binaries, and embed git-derived version metadata by default while allowing release workflows to pin the exact release tag. Co-authored-by: Cursor <cursoragent@cursor.com>
cmmarslender
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--versionhandling tovdf_client,vdf_bench,hw_test, andhw_vdf_clientso each binary can print its embedded version and exit.src/version.hppand wireCHIAVDF_VERSIONinto both Makefile and CMake builds with agit describefallback todev.Test plan
make -f src/Makefile.vdf-client vdf_client vdf_bench hw_test hw_vdf_clientsrc/vdf_client --versionsrc/vdf_bench --versionsrc/hw_test --versionsrc/hw_vdf_client --versionMade with Cursor
Note
Low Risk
Mostly additive CLI/build metadata changes; low functional risk aside from minor argument-parsing/CI build-flag wiring.
Overview
Adds
--versionacrossvdf_client,vdf_bench,hw_test, andhw_vdf_client, using a sharedversion.hpphelper to print the embedded version and exit.Introduces a build-time
CHIAVDF_VERSIONmacro wired through bothMakefile.vdf-clientandCMakeLists.txt(defaulting togit describeordev), and updates thevdf-client-hwGitHub Actions workflow to pin that version to the release tag for release builds (including Windows CMake builds).Written by Cursor Bugbot for commit fd073b7. This will update automatically on new commits. Configure here.