[Git][reproducible-builds/reproducible-website][master] rust: Add paragraph text for SOURCE_DATE_EPOCH

kpcyrd (@kpcyrd) gitlab at salsa.debian.org
Tue Mar 3 00:00:53 UTC 2026



kpcyrd pushed to branch master at Reproducible Builds / reproducible-website


Commits:
4bf02f0d by kpcyrd at 2026-03-03T00:57:52+01:00
rust: Add paragraph text for SOURCE_DATE_EPOCH

- - - - -


1 changed file:

- _docs/rust.md


Changes:

=====================================
_docs/rust.md
=====================================
@@ -58,19 +58,26 @@ investigation there.
 
 [^diff-target]: [Debugging Reproducibility Issues in Rust Software](https://notes.8pit.net/notes/iqfs.html)
 
-[^fingerprints]: [Reproducible Builds: Make target/.fingerprint/.../dep-... dep-info files deterministic](https://github.com/rust-lang/cargo/pull/16691)
-
-Embedded Build Time
--------------------
-
-[`SOURCE_DATE_EPOCH`]({{ "/docs/source-date-epoch/#rust" | relative_url }}).
+[^fingerprint]: [Reproducible Builds: Make target/.fingerprint/.../dep-... dep-info files deterministic](https://github.com/rust-lang/cargo/pull/16691)
 
 Build Scripts (`build.rs`)
 --------------------------
 
-See [stable outputs]({{ "/docs/stable-outputs/#rust" | relative_url }})[^docs].
+See [stable outputs]({{ "/docs/stable-outputs/#rust" | relative_url }})[^build-scripts].
+
+[^build-scripts]: [Build Scripts - The Cargo Book](https://doc.rust-lang.org/cargo/reference/build-scripts.html)
+
+Embedded Build Time
+-------------------
+
+It is very uncommon for Rust programs to record the date and time the binary
+has been compiled. If you still need the current time for some reason during
+the compile, it is recommended to check if the `SOURCE_DATE_EPOCH` environment
+variable is set, and only read the current system time if it is not set.
 
-[^docs]: [Build Scripts - The Cargo Book](https://doc.rust-lang.org/cargo/reference/build-scripts.html)
+The [`SOURCE_DATE_EPOCH`]({{ "/docs/source-date-epoch/#rust" | relative_url }})
+environment variable has it's own documentation page that also contains Rust
+example code.
 
 rust-embed
 ----------



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/4bf02f0d05d6a9b76d48dbc804fc2695eddc5b27

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/4bf02f0d05d6a9b76d48dbc804fc2695eddc5b27
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260303/3da5ecbd/attachment.htm>


More information about the rb-commits mailing list