This page is docs/REPRODUCIBLE_BUILDS.md in the repository. The repository copy is the source; this is the same text with its links rewritten for the wiki.

Reproducible builds

A privacy tool you cannot verify is a privacy tool you are trusting on faith. Reproducible builds close the gap between "the source is open" and "the binary I downloaded is that source": anyone can rebuild a release and confirm, byte for byte, that it matches what was published.

Verify a release

git clone https://github.com/tilas01/veilvoice && cd veilvoice
git checkout v0.1.0
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
cargo build --release --locked
sha256sum target/release/veilvoice

Compare against SHA256SUMS in the release. If they differ, something is wrong and we want to hear about it.

What makes it reproducible

Source of nondeterminismHow it is pinned
Compiler versionrust-toolchain.toml pins an exact stable release; rustup honours it automatically
Dependency versionsCargo.lock is committed and CI builds with --locked
Codegen unit orderingcodegen-units = 1 and lto = "fat" in the release profile
Absolute paths in the binary--remap-path-prefix, set by the build environment, never hardcoded
Build timestampsSOURCE_DATE_EPOCH, derived from the commit date
Debug infostrip = true, debug = false
Incremental compilationincremental = false
CPU feature detectionNo target-cpu=native; the default baseline keeps binaries portable and identical across machines

Path remapping deliberately lives in the environment rather than in .cargo/config.toml. Hardcoding one contributor's home directory would make the build reproducible only for them, which is the opposite of the point.

In CI

The release workflow sets SOURCE_DATE_EPOCH from the tagged commit and passes --remap-path-prefix for both the workspace and CARGO_HOME. It then builds each target twice, in different directories, and fails if the two binaries differ, so a regression in reproducibility is caught before release, not after somebody reports it.

Known limits

  • Cross-platform binaries differ, obviously. Reproducibility is per-target: a Linux x86-64 build reproduces a Linux x86-64 build.
  • Linker version matters. A different system linker can produce a different binary from identical object files. CI records the exact runner image in the release notes so a verifier can match it.
  • The GUI binary embeds an icon generated by assets/generate.py. That script is deterministic (fixed filter type, fixed zlib level), and the generated assets are committed, so it is not part of the build path.
  • Signing is separate. Signatures are made after the build and are not themselves part of the reproducible artefact. Verify the hash first, then the signature over the hash file.

Release signing

Release artefacts ship with SHA256SUMS and a detached OpenPGP signature over it. The private signing key is not in this repository and never will be, only the maintainer holds it, and CI reads it from a repository secret that is absent on forks. A fresh clone builds with no secrets at all; signing is strictly a release-time step layered on top.

This page is also Doc-REPRODUCIBLE-BUILDS in the GitHub wiki, and both are generated from the same document in the repository.