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.
The first and second commits centralize version handling to the top-level Cargo.toml file and add a MSRV respectively (one of the build deps has a MSRV on 1.78 which is why it's so high comparatively).
The third commit adds a new serpent_buildinfo crate which processes git info, version, and build timestamps during the build and exposes a simple API for boulder and moss to use. This uses the git CLI directly and should work with git workspaces. It should also work if a .git directory is not present (intended to work with #241) at which point it will only capture the version and build timestamp.
Since the serpent_buildinfo crate will be rebuilt on virtually all code changes I tried to ensure that it builds quickly.
cargo::rerun-if-changed
instructions are setup to rebuild it on any changes to source code directories (non-source code directories and files should be skipped).It also respects SOURCE_DATE_EPOCH and will use that for the build timestamp if present.