Expand description
Binary-side helper: one function every Nimblesite binary can call from
fn main() to implement the shipwright --version contract.
Plain form (single grep-friendly line):
<name> <semver>JSON form (schema-bound to schemas/version-manifest.schema.json):
<binary> --version --jsonSee build_info.rs.example for the recommended build.rs that emits
GIT_SHA and BUILD_TIME as compile-time env vars.
Structs§
- Build
Info - Compile-time build metadata produced by a downstream crate’s
build.rs. - Version
Spec - Declarative spec of what a binary should report. Keeps per-call argument
counts small enough for
clippy::too_many_arguments.
Enums§
- CliError
- Error from the CLI helpers: either an I/O failure writing to stdout, or a manifest validation/serialization failure.
- Version
Mode - How the binary was invoked with respect to the
--versioncontract.
Functions§
- dispatch
- One-call dispatcher used by thin
fn main()bodies. - write_
json - Write the
--version --jsonpayload tow. - write_
plain - Write the plain
--versionline.