ver-stub-tool

Crates.iover-stub-tool
lib.rsver-stub-tool
version0.3.0
created_at2025-12-12 19:26:15.074149+00
updated_at2025-12-17 00:32:51.085026+00
descriptionCLI tool for injecting version data into binaries
homepage
repositoryhttps://github.com/cbeck88/ver-stub-rs
max_upload_size
id1982021
size20,144
Chris Beck (cbeck88)

documentation

README

ver-stub-tool

CLI tool for injecting version data into binaries using ver-stub.

Crates.io Crates.io License License

Installation

cargo install ver-stub-tool
rustup component add llvm-tools

Example Usage

Patch a binary directly

cargo build --release
ver-stub --all-git --build-timestamp patch target/release/my-bin

This produces a patched binary at target/release/my-bin.bin.

Generate section data file

For use with cargo objcopy or other tools:

ver-stub --all-git --build-timestamp -o target/ver_stub_data
cargo objcopy --release --bin my-bin -- --update-section ver_stub=target/ver_stub_data my-bin.bin

Options

This tool exposes CLI parameters for the functionality in ver-stub-build. Run ver-stub --help for the full list of options.

Reproducible Builds

For reproducible builds, two environment variables are supported:

  • VER_STUB_IDEMPOTENT: If set, build timestamp/date are never included (always None). This is the simplest option for fully reproducible builds.

  • VER_STUB_BUILD_TIME: Override the build timestamp with a fixed value. Accepts unix timestamps or RFC 3339 datetimes.

VER_STUB_IDEMPOTENT takes precedence if both are set.

See Also

Commit count: 0

cargo fmt