Skip to main content

Crate shipwright

Crate shipwright 

Source
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 --json

See build_info.rs.example for the recommended build.rs that emits GIT_SHA and BUILD_TIME as compile-time env vars.

Structs§

BuildInfo
Compile-time build metadata produced by a downstream crate’s build.rs.
VersionSpec
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.
VersionMode
How the binary was invoked with respect to the --version contract.

Functions§

dispatch
One-call dispatcher used by thin fn main() bodies.
write_json
Write the --version --json payload to w.
write_plain
Write the plain --version line.