1#[doc=r#"
8The name of the Git branch that this project was built from.
9This constant will be empty if the branch cannot be determined."#]
10#[allow(dead_code)]
11#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
12pub const BRANCH :&str = r#"main"#;
13
14#[doc=r#"
15Operating system and architecture on which the project was build.
16The format of this variable is always `os-arch`,
17where `os` is the operating system name as returned by [`std::env::consts::OS`],
18and `arch` is the computer architecture as returned by [`std::env::consts::ARCH`]."#]
19#[allow(dead_code)]
20#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
21pub const BUILD_OS :&str = r#"linux-x86_64"#;
22
23#[doc=r#"
24The debug configuration with which the project was built.
25Note that this is not the Rust channel, but either `debug` or `release`, depending on whether debug assertions were enabled in the build or not. "#]
26#[allow(dead_code)]
27#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
28pub const BUILD_RUST_CHANNEL :&str = r#"debug"#;
29
30#[doc=r#"
31The [target](https://doc.rust-lang.org/rustc/targets/index.html) for this build.
32This is possibly distinct from the host target during build, in which case this project build was created via cross-compilation."#]
33#[allow(dead_code)]
34#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
35pub const BUILD_TARGET :&str = r#"x86_64-unknown-linux-gnu"#;
36
37#[doc=r#"
38The architecture of the target for this build. This is the "architecture" part of the [`BUILD_TARGET`] constant."#]
39#[allow(dead_code)]
40#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
41pub const BUILD_TARGET_ARCH :&str = r#"x86_64"#;
42
43#[doc=r#"
44The project build time, formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC)."#]
45#[allow(dead_code)]
46#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
47pub const BUILD_TIME :&str = r#"2025-12-29 14:32:12 +00:00"#;
48
49#[doc=r#"
50The project build time as a Unix timestamp (seconds since Unix epoch)."#]
51#[allow(dead_code)]
52#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
53pub const BUILD_TIMESTAMP :i64 = 1767018732;
54
55#[doc=r#"
56The project build time, formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers)."#]
57#[allow(dead_code)]
58#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
59pub const BUILD_TIME_2822 :&str = r#"Mon, 29 Dec 2025 14:32:12 +0000"#;
60
61#[doc=r#"
62The project build time, formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."#]
63#[allow(dead_code)]
64#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
65pub const BUILD_TIME_3339 :&str = r#"2025-12-29T14:32:12Z"#;
66
67#[doc=r#"
68The directory of the Cargo.toml manifest file of the project during build.
69Note that this variable will contain a full local file system path, and will therefore contain sensitive information and not be reproducible."#]
70#[allow(dead_code)]
71#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
72pub const CARGO_MANIFEST_DIR :&str = r#"/libredr/common"#;
73
74#[doc=r#"
75The dependency tree of the project, as output by `cargo tree`.
76Note that this variable may contain local file system paths for path dependencies, and may therefore contain sensitive information and not be reproducible."#]
77#[allow(dead_code)]
78#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
79pub const CARGO_TREE :&str = r#"
80├── anyhow v1.0.100
81│ └── backtrace v0.3.76
82│ ├── addr2line v0.25.1
83│ │ └── gimli v0.32.3
84│ ├── cfg-if v1.0.4
85│ ├── libc v0.2.178
86│ ├── miniz_oxide v0.8.9
87│ │ └── adler2 v2.0.1
88│ ├── object v0.37.3
89│ │ └── memchr v2.7.6
90│ └── rustc-demangle v0.1.26
91├── blake3 v1.8.2
92│ ├── arrayref v0.3.9
93│ ├── arrayvec v0.7.6
94│ ├── cfg-if v1.0.4
95│ └── constant_time_eq v0.3.1
96│ [build-dependencies]
97│ └── cc v1.2.51
98│ ├── find-msvc-tools v0.1.6
99│ ├── jobserver v0.1.34
100│ │ └── libc v0.2.178
101│ ├── libc v0.2.178
102│ └── shlex v1.3.0
103├── chrono v0.4.42
104│ ├── iana-time-zone v0.1.64
105│ └── num-traits v0.2.19
106│ [build-dependencies]
107│ └── autocfg v1.5.0
108├── configparser v3.1.0
109├── const_format v0.2.35
110│ └── const_format_proc_macros v0.2.34 (proc-macro)
111│ ├── proc-macro2 v1.0.104
112│ │ └── unicode-ident v1.0.22
113│ ├── quote v1.0.42
114│ │ └── proc-macro2 v1.0.104 (*)
115│ └── unicode-xid v0.2.6
116├── hashbrown v0.16.1
117│ ├── allocator-api2 v0.2.21
118│ ├── equivalent v1.0.2
119│ ├── foldhash v0.2.0
120│ └── serde_core v1.0.228
121├── nalgebra v0.34.1
122│ ├── approx v0.5.1
123│ │ └── num-traits v0.2.19 (*)
124│ ├── matrixmultiply v0.3.10
125│ │ └── rawpointer v0.2.1
126│ │ [build-dependencies]
127│ │ └── autocfg v1.5.0
128│ ├── nalgebra-macros v0.3.0 (proc-macro)
129│ │ ├── proc-macro2 v1.0.104 (*)
130│ │ ├── quote v1.0.42 (*)
131│ │ └── syn v2.0.111
132│ │ ├── proc-macro2 v1.0.104 (*)
133│ │ ├── quote v1.0.42 (*)
134│ │ └── unicode-ident v1.0.22
135│ ├── num-complex v0.4.6
136│ │ └── num-traits v0.2.19 (*)
137│ ├── num-rational v0.4.2
138│ │ ├── num-integer v0.1.46
139│ │ │ └── num-traits v0.2.19 (*)
140│ │ └── num-traits v0.2.19 (*)
141│ ├── num-traits v0.2.19 (*)
142│ ├── simba v0.9.1
143│ │ ├── approx v0.5.1 (*)
144│ │ ├── num-complex v0.4.6 (*)
145│ │ ├── num-traits v0.2.19 (*)
146│ │ ├── paste v1.0.15 (proc-macro)
147│ │ └── wide v0.7.33
148│ │ ├── bytemuck v1.24.0
149│ │ └── safe_arch v0.7.4
150│ │ └── bytemuck v1.24.0
151│ └── typenum v1.19.0
152├── ndarray v0.17.1
153│ ├── matrixmultiply v0.3.10 (*)
154│ ├── num-complex v0.4.6 (*)
155│ ├── num-integer v0.1.46 (*)
156│ ├── num-traits v0.2.19 (*)
157│ ├── rawpointer v0.2.1
158│ └── serde v1.0.228
159│ ├── serde_core v1.0.228
160│ └── serde_derive v1.0.228 (proc-macro)
161│ ├── proc-macro2 v1.0.104 (*)
162│ ├── quote v1.0.42 (*)
163│ └── syn v2.0.111 (*)
164├── postcard v1.1.3
165│ ├── cobs v0.3.0
166│ │ └── thiserror v2.0.17
167│ │ └── thiserror-impl v2.0.17 (proc-macro)
168│ │ ├── proc-macro2 v1.0.104 (*)
169│ │ ├── quote v1.0.42 (*)
170│ │ └── syn v2.0.111 (*)
171│ ├── heapless v0.7.17
172│ │ ├── hash32 v0.2.1
173│ │ │ └── byteorder v1.5.0
174│ │ ├── serde v1.0.228 (*)
175│ │ ├── spin v0.9.8
176│ │ │ └── lock_api v0.4.14
177│ │ │ └── scopeguard v1.2.0
178│ │ └── stable_deref_trait v1.2.1
179│ │ [build-dependencies]
180│ │ └── rustc_version v0.4.1
181│ │ └── semver v1.0.27
182│ └── serde v1.0.228 (*)
183├── serde v1.0.228 (*)
184├── shadow-rs v1.5.0
185│ ├── const_format v0.2.35 (*)
186│ ├── git2 v0.20.3
187│ │ ├── bitflags v2.10.0
188│ │ ├── libc v0.2.178
189│ │ ├── libgit2-sys v0.18.3+1.9.2
190│ │ │ ├── libc v0.2.178
191│ │ │ └── libz-sys v1.1.23
192│ │ │ └── libc v0.2.178
193│ │ │ [build-dependencies]
194│ │ │ ├── cc v1.2.51 (*)
195│ │ │ ├── pkg-config v0.3.32
196│ │ │ └── vcpkg v0.2.15
197│ │ │ [build-dependencies]
198│ │ │ ├── cc v1.2.51 (*)
199│ │ │ └── pkg-config v0.3.32
200│ │ ├── log v0.4.29
201│ │ └── url v2.5.7
202│ │ ├── form_urlencoded v1.2.2
203│ │ │ └── percent-encoding v2.3.2
204│ │ ├── idna v1.1.0
205│ │ │ ├── idna_adapter v1.2.1
206│ │ │ │ ├── icu_normalizer v2.1.1
207│ │ │ │ │ ├── icu_collections v2.1.1
208│ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro)
209│ │ │ │ │ │ │ ├── proc-macro2 v1.0.104 (*)
210│ │ │ │ │ │ │ ├── quote v1.0.42 (*)
211│ │ │ │ │ │ │ └── syn v2.0.111 (*)
212│ │ │ │ │ │ ├── potential_utf v0.1.4
213│ │ │ │ │ │ │ └── zerovec v0.11.5
214│ │ │ │ │ │ │ ├── yoke v0.8.1
215│ │ │ │ │ │ │ │ ├── stable_deref_trait v1.2.1
216│ │ │ │ │ │ │ │ ├── yoke-derive v0.8.1 (proc-macro)
217│ │ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.104 (*)
218│ │ │ │ │ │ │ │ │ ├── quote v1.0.42 (*)
219│ │ │ │ │ │ │ │ │ ├── syn v2.0.111 (*)
220│ │ │ │ │ │ │ │ │ └── synstructure v0.13.2
221│ │ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.104 (*)
222│ │ │ │ │ │ │ │ │ ├── quote v1.0.42 (*)
223│ │ │ │ │ │ │ │ │ └── syn v2.0.111 (*)
224│ │ │ │ │ │ │ │ └── zerofrom v0.1.6
225│ │ │ │ │ │ │ │ └── zerofrom-derive v0.1.6 (proc-macro)
226│ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.104 (*)
227│ │ │ │ │ │ │ │ ├── quote v1.0.42 (*)
228│ │ │ │ │ │ │ │ ├── syn v2.0.111 (*)
229│ │ │ │ │ │ │ │ └── synstructure v0.13.2 (*)
230│ │ │ │ │ │ │ ├── zerofrom v0.1.6 (*)
231│ │ │ │ │ │ │ └── zerovec-derive v0.11.2 (proc-macro)
232│ │ │ │ │ │ │ ├── proc-macro2 v1.0.104 (*)
233│ │ │ │ │ │ │ ├── quote v1.0.42 (*)
234│ │ │ │ │ │ │ └── syn v2.0.111 (*)
235│ │ │ │ │ │ ├── yoke v0.8.1 (*)
236│ │ │ │ │ │ ├── zerofrom v0.1.6 (*)
237│ │ │ │ │ │ └── zerovec v0.11.5 (*)
238│ │ │ │ │ ├── icu_normalizer_data v2.1.1
239│ │ │ │ │ ├── icu_provider v2.1.1
240│ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
241│ │ │ │ │ │ ├── icu_locale_core v2.1.1
242│ │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
243│ │ │ │ │ │ │ ├── litemap v0.8.1
244│ │ │ │ │ │ │ ├── tinystr v0.8.2
245│ │ │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
246│ │ │ │ │ │ │ │ └── zerovec v0.11.5 (*)
247│ │ │ │ │ │ │ ├── writeable v0.6.2
248│ │ │ │ │ │ │ └── zerovec v0.11.5 (*)
249│ │ │ │ │ │ ├── writeable v0.6.2
250│ │ │ │ │ │ ├── yoke v0.8.1 (*)
251│ │ │ │ │ │ ├── zerofrom v0.1.6 (*)
252│ │ │ │ │ │ ├── zerotrie v0.2.3
253│ │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
254│ │ │ │ │ │ │ ├── yoke v0.8.1 (*)
255│ │ │ │ │ │ │ └── zerofrom v0.1.6 (*)
256│ │ │ │ │ │ └── zerovec v0.11.5 (*)
257│ │ │ │ │ ├── smallvec v1.15.1
258│ │ │ │ │ └── zerovec v0.11.5 (*)
259│ │ │ │ └── icu_properties v2.1.2
260│ │ │ │ ├── icu_collections v2.1.1 (*)
261│ │ │ │ ├── icu_locale_core v2.1.1 (*)
262│ │ │ │ ├── icu_properties_data v2.1.2
263│ │ │ │ ├── icu_provider v2.1.1 (*)
264│ │ │ │ ├── zerotrie v0.2.3 (*)
265│ │ │ │ └── zerovec v0.11.5 (*)
266│ │ │ ├── smallvec v1.15.1
267│ │ │ └── utf8_iter v1.0.4
268│ │ ├── percent-encoding v2.3.2
269│ │ └── serde v1.0.228 (*)
270│ ├── is_debug v1.1.0
271│ ├── time v0.3.44
272│ │ ├── deranged v0.5.5
273│ │ │ └── powerfmt v0.2.0
274│ │ ├── itoa v1.0.17
275│ │ ├── libc v0.2.178
276│ │ ├── num-conv v0.1.0
277│ │ ├── num_threads v0.1.7
278│ │ ├── powerfmt v0.2.0
279│ │ └── time-core v0.1.6
280│ └── tzdb v0.7.3
281│ ├── iana-time-zone v0.1.64
282│ ├── tz-rs v0.7.1
283│ └── tzdb_data v0.2.3
284│ └── tz-rs v0.7.1
285├── tobj v4.0.3
286│ └── ahash v0.8.12
287│ ├── cfg-if v1.0.4
288│ ├── getrandom v0.3.4
289│ │ ├── cfg-if v1.0.4
290│ │ └── libc v0.2.178
291│ ├── once_cell v1.21.3
292│ └── zerocopy v0.8.31
293│ [build-dependencies]
294│ └── version_check v0.9.5
295├── tokio v1.48.0
296│ ├── bytes v1.11.0
297│ ├── libc v0.2.178
298│ ├── mio v1.1.1
299│ │ └── libc v0.2.178
300│ ├── parking_lot v0.12.5
301│ │ ├── lock_api v0.4.14 (*)
302│ │ └── parking_lot_core v0.9.12
303│ │ ├── cfg-if v1.0.4
304│ │ ├── libc v0.2.178
305│ │ └── smallvec v1.15.1
306│ ├── pin-project-lite v0.2.16
307│ ├── signal-hook-registry v1.4.8
308│ │ ├── errno v0.3.14
309│ │ │ └── libc v0.2.178
310│ │ └── libc v0.2.178
311│ ├── socket2 v0.6.1
312│ │ └── libc v0.2.178
313│ └── tokio-macros v2.6.0 (proc-macro)
314│ ├── proc-macro2 v1.0.104 (*)
315│ ├── quote v1.0.42 (*)
316│ └── syn v2.0.111 (*)
317├── tracing v0.1.44
318│ ├── pin-project-lite v0.2.16
319│ ├── tracing-attributes v0.1.31 (proc-macro)
320│ │ ├── proc-macro2 v1.0.104 (*)
321│ │ ├── quote v1.0.42 (*)
322│ │ └── syn v2.0.111 (*)
323│ └── tracing-core v0.1.36
324│ └── once_cell v1.21.3
325└── uuid v1.19.0
326 ├── getrandom v0.3.4 (*)
327 ├── rand v0.9.2
328 │ ├── rand_chacha v0.9.0
329 │ │ ├── ppv-lite86 v0.2.21
330 │ │ │ └── zerocopy v0.8.31
331 │ │ └── rand_core v0.9.3
332 │ │ └── getrandom v0.3.4 (*)
333 │ └── rand_core v0.9.3 (*)
334 ├── serde_core v1.0.228
335 └── uuid-macro-internal v1.19.0 (proc-macro)
336 ├── proc-macro2 v1.0.104 (*)
337 ├── quote v1.0.42 (*)
338 └── syn v2.0.111 (*)
339[build-dependencies]
340└── shadow-rs v1.5.0 (*)
341"#;
342
343#[doc=r#"
344The cargo version which which the project was built, as output by `cargo --version`."#]
345#[allow(dead_code)]
346#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
347pub const CARGO_VERSION :&str = r#"cargo 1.92.0 (344c4567c 2025-10-21)"#;
348
349#[doc=r#"
350The number of commits since the last Git tag on the branch that this project was built from.
351This value indicates how many commits have been made after the last tag and before the current commit.
352
353If there are no additional commits after the last tag (i.e., the current commit is exactly at a tag),
354this value will be `0`.
355
356This constant will be empty or `0` if the last tag cannot be determined or if there are no commits after it.
357"#]
358#[allow(dead_code)]
359#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
360pub const COMMITS_SINCE_TAG :usize = 3;
361
362#[doc=r#"
363The author of the Git commit that this project was built from.
364
365This constant will be empty if the last commit cannot be determined."#]
366#[allow(dead_code)]
367#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
368pub const COMMIT_AUTHOR :&str = r#"Bohan Yu"#;
369
370#[doc=r#"The time of the Git commit that this project was built from.
371The time is formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC).
372The timezone information from the original commit is preserved.
373
374This constant will be empty if the last commit cannot be determined."#]
375#[allow(dead_code)]
376#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
377pub const COMMIT_DATE :&str = r#"2025-12-29 22:24:56 +08:00"#;
378
379#[doc=r#"
380The time of the Git commit that this project was built from.
381The time is formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers).
382The timezone information from the original commit is preserved.
383
384This constant will be empty if the last commit cannot be determined."#]
385#[allow(dead_code)]
386#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
387pub const COMMIT_DATE_2822 :&str = r#"Mon, 29 Dec 2025 22:24:56 +0800"#;
388
389#[doc=r#"
390The time of the Git commit that this project was built from.
391The time is formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
392The timezone information from the original commit is preserved.
393
394This constant will be empty if the last commit cannot be determined."#]
395#[allow(dead_code)]
396#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
397pub const COMMIT_DATE_3339 :&str = r#"2025-12-29T22:24:56+08:00"#;
398
399#[doc=r#"
400The e-mail address of the author of the Git commit that this project was built from.
401
402This constant will be empty if the last commit cannot be determined."#]
403#[allow(dead_code)]
404#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
405pub const COMMIT_EMAIL :&str = r#"ybh1998@librechip.com"#;
406
407#[doc=r#"
408The full commit hash of the Git commit that this project was built from.
409An abbreviated, but not necessarily unique, version of this is [`SHORT_COMMIT`].
410
411This constant will be empty if the last commit cannot be determined."#]
412#[allow(dead_code)]
413#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
414pub const COMMIT_HASH :&str = r#"3800c471b8e17737017c5bfdec3ad13693179bb2"#;
415
416#[doc=r#"
417The time of the Git commit as a Unix timestamp (seconds since Unix epoch).
418
419This constant will be empty if the last commit cannot be determined."#]
420#[allow(dead_code)]
421#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
422pub const COMMIT_TIMESTAMP :i64 = 1767018296;
423
424#[doc=r#"
425Whether the Git working tree was clean at the time of project build (`true`), or not (`false`).
426
427This constant will be `false` if the last commit cannot be determined."#]
428#[allow(dead_code)]
429#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
430pub const GIT_CLEAN :bool = true;
431
432#[doc=r#"
433The Git working tree status as a list of files with their status, similar to `git status`.
434Each line of the list is preceded with ` * `, followed by the file name.
435Files marked `(dirty)` have unstaged changes.
436Files marked `(staged)` have staged changes.
437
438This constant will be empty if the working tree status cannot be determined."#]
439#[allow(dead_code)]
440#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
441pub const GIT_STATUS_FILE :&str = r#""#;
442
443#[doc=r#"
444The name of the last Git tag on the branch that this project was built from.
445As opposed to [`TAG`], this does not require the current commit to be tagged, just one of its parents.
446
447This constant will be empty if the last tag cannot be determined."#]
448#[allow(dead_code)]
449#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
450pub const LAST_TAG :&str = r#"v0.0.21"#;
451
452#[doc=r#"
453The project's description, as determined by the Cargo.toml manifest."#]
454#[allow(dead_code)]
455#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
456pub const PKG_DESCRIPTION :&str = r#"LibreDR is an open-source ray-tracing differentiable renderer"#;
457
458#[doc=r#"
459The project's full version string, as determined by the Cargo.toml manifest."#]
460#[allow(dead_code)]
461#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
462pub const PKG_VERSION :&str = r#"0.0.22"#;
463
464#[doc=r#"
465The project's semver major version, as determined by the Cargo.toml manifest."#]
466#[allow(dead_code)]
467#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
468pub const PKG_VERSION_MAJOR :&str = r#"0"#;
469
470#[doc=r#"
471The project's semver minor version, as determined by the Cargo.toml manifest."#]
472#[allow(dead_code)]
473#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
474pub const PKG_VERSION_MINOR :&str = r#"0"#;
475
476#[doc=r#"
477The project's semver patch version, as determined by the Cargo.toml manifest."#]
478#[allow(dead_code)]
479#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
480pub const PKG_VERSION_PATCH :&str = r#"22"#;
481
482#[doc=r#"
483The project's semver pre-release version, as determined by the Cargo.toml manifest."#]
484#[allow(dead_code)]
485#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
486pub const PKG_VERSION_PRE :&str = r#""#;
487
488#[doc=r#"
489The project name, as determined by the Cargo.toml manifest."#]
490#[allow(dead_code)]
491#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
492pub const PROJECT_NAME :&str = r#"libredr-common"#;
493
494#[doc=r#"
495The [Rustup toolchain](https://rust-lang.github.io/rustup/concepts/toolchains.html) with which the project was built.
496Note that as per Rustup toolchain format, this variable may or may not contain host and date information,
497but it will always contain [channel](https://rust-lang.github.io/rustup/concepts/channels.html) information (stable, beta or nightly)."#]
498#[allow(dead_code)]
499#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
500pub const RUST_CHANNEL :&str = r#"stable-x86_64-unknown-linux-gnu"#;
501
502#[doc=r#"
503Rust version with which the project was built.
504The version always uses the canonical Rust version format,
505and is therefore identical to the output of the build toolchain's `rustc --version`."#]
506#[allow(dead_code)]
507#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
508pub const RUST_VERSION :&str = r#"rustc 1.92.0 (ded5c06cf 2025-12-08)"#;
509
510#[doc=r#"
511The short hash of the Git commit that this project was built from.
512Note that this will always truncate [`COMMIT_HASH`] to 8 characters if necessary.
513Depending on the amount of commits in your project, this may not yield a unique Git identifier
514([see here for more details on hash abbreviation](https://git-scm.com/docs/git-describe#_examples)).
515
516This constant will be empty if the last commit cannot be determined."#]
517#[allow(dead_code)]
518#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
519pub const SHORT_COMMIT :&str = r#"3800c471"#;
520
521#[doc=r#"
522The name of the Git tag that this project was built from.
523Note that this will be empty if there is no tag for the HEAD at the time of build."#]
524#[allow(dead_code)]
525#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
526pub const TAG :&str = r#""#;
527
528#[allow(dead_code,missing_docs)]
532#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
533pub const VERSION:&str = shadow_rs::formatcp!(r#"
534pkg_version:{}
535branch:{}
536commit_hash:{}
537build_time:{}
538build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
539);
540
541
542#[allow(dead_code,missing_docs)]
546#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
547pub const CLAP_LONG_VERSION:&str = shadow_rs::formatcp!(r#"{}
548branch:{}
549commit_hash:{}
550build_time:{}
551build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
552);
553
554
555#[allow(non_snake_case)]
558#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
559pub struct BuildInfoDisplay {
560 pub BRANCH: bool,
561 pub BUILD_OS: bool,
562 pub BUILD_RUST_CHANNEL: bool,
563 pub BUILD_TARGET: bool,
564 pub BUILD_TARGET_ARCH: bool,
565 pub BUILD_TIME: bool,
566 pub BUILD_TIMESTAMP: bool,
567 pub BUILD_TIME_2822: bool,
568 pub BUILD_TIME_3339: bool,
569 pub CARGO_MANIFEST_DIR: bool,
570 pub CARGO_TREE: bool,
571 pub CARGO_VERSION: bool,
572 pub COMMITS_SINCE_TAG: bool,
573 pub COMMIT_AUTHOR: bool,
574 pub COMMIT_DATE: bool,
575 pub COMMIT_DATE_2822: bool,
576 pub COMMIT_DATE_3339: bool,
577 pub COMMIT_EMAIL: bool,
578 pub COMMIT_HASH: bool,
579 pub COMMIT_TIMESTAMP: bool,
580 pub GIT_CLEAN: bool,
581 pub GIT_STATUS_FILE: bool,
582 pub LAST_TAG: bool,
583 pub PKG_DESCRIPTION: bool,
584 pub PKG_VERSION: bool,
585 pub PKG_VERSION_MAJOR: bool,
586 pub PKG_VERSION_MINOR: bool,
587 pub PKG_VERSION_PATCH: bool,
588 pub PKG_VERSION_PRE: bool,
589 pub PROJECT_NAME: bool,
590 pub RUST_CHANNEL: bool,
591 pub RUST_VERSION: bool,
592 pub SHORT_COMMIT: bool,
593 pub TAG: bool,
594 pub VERSION: bool,
595 pub CLAP_LONG_VERSION: bool,
596}
597
598impl Default for BuildInfoDisplay {
599 #[allow(dead_code)]
600 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
601 fn default() -> Self {
604 Self {
605 BRANCH: true,
606 BUILD_OS: true,
607 BUILD_RUST_CHANNEL: true,
608 BUILD_TARGET: true,
609 BUILD_TARGET_ARCH: true,
610 BUILD_TIME: true,
611 BUILD_TIMESTAMP: true,
612 BUILD_TIME_2822: true,
613 BUILD_TIME_3339: true,
614 CARGO_MANIFEST_DIR: true,
615 CARGO_TREE: true,
616 CARGO_VERSION: true,
617 COMMITS_SINCE_TAG: true,
618 COMMIT_AUTHOR: true,
619 COMMIT_DATE: true,
620 COMMIT_DATE_2822: true,
621 COMMIT_DATE_3339: true,
622 COMMIT_EMAIL: true,
623 COMMIT_HASH: true,
624 COMMIT_TIMESTAMP: true,
625 GIT_CLEAN: true,
626 GIT_STATUS_FILE: true,
627 LAST_TAG: true,
628 PKG_DESCRIPTION: true,
629 PKG_VERSION: true,
630 PKG_VERSION_MAJOR: true,
631 PKG_VERSION_MINOR: true,
632 PKG_VERSION_PATCH: true,
633 PKG_VERSION_PRE: true,
634 PROJECT_NAME: true,
635 RUST_CHANNEL: true,
636 RUST_VERSION: true,
637 SHORT_COMMIT: true,
638 TAG: true,
639 VERSION: true,
640 CLAP_LONG_VERSION: true,
641 }
642 }
643}
644
645impl BuildInfoDisplay {
646 #[allow(dead_code)]
647 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
648 pub fn all() -> Self {
650 Self {
651 BRANCH: true,
652 BUILD_OS: true,
653 BUILD_RUST_CHANNEL: true,
654 BUILD_TARGET: true,
655 BUILD_TARGET_ARCH: true,
656 BUILD_TIME: true,
657 BUILD_TIMESTAMP: true,
658 BUILD_TIME_2822: true,
659 BUILD_TIME_3339: true,
660 CARGO_MANIFEST_DIR: true,
661 CARGO_TREE: true,
662 CARGO_VERSION: true,
663 COMMITS_SINCE_TAG: true,
664 COMMIT_AUTHOR: true,
665 COMMIT_DATE: true,
666 COMMIT_DATE_2822: true,
667 COMMIT_DATE_3339: true,
668 COMMIT_EMAIL: true,
669 COMMIT_HASH: true,
670 COMMIT_TIMESTAMP: true,
671 GIT_CLEAN: true,
672 GIT_STATUS_FILE: true,
673 LAST_TAG: true,
674 PKG_DESCRIPTION: true,
675 PKG_VERSION: true,
676 PKG_VERSION_MAJOR: true,
677 PKG_VERSION_MINOR: true,
678 PKG_VERSION_PATCH: true,
679 PKG_VERSION_PRE: true,
680 PROJECT_NAME: true,
681 RUST_CHANNEL: true,
682 RUST_VERSION: true,
683 SHORT_COMMIT: true,
684 TAG: true,
685 VERSION: true,
686 CLAP_LONG_VERSION: true,
687 }
688 }
689}
690
691impl core::fmt::Display for BuildInfoDisplay {
692 #[allow(dead_code)]
693 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
694 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
695 if self.BRANCH { writeln!(f, "BRANCH:{BRANCH}\n")?; }
696 if self.BUILD_OS { writeln!(f, "BUILD_OS:{BUILD_OS}\n")?; }
697 if self.BUILD_RUST_CHANNEL { writeln!(f, "BUILD_RUST_CHANNEL:{BUILD_RUST_CHANNEL}\n")?; }
698 if self.BUILD_TARGET { writeln!(f, "BUILD_TARGET:{BUILD_TARGET}\n")?; }
699 if self.BUILD_TARGET_ARCH { writeln!(f, "BUILD_TARGET_ARCH:{BUILD_TARGET_ARCH}\n")?; }
700 if self.BUILD_TIME { writeln!(f, "BUILD_TIME:{BUILD_TIME}\n")?; }
701 if self.BUILD_TIMESTAMP { writeln!(f, "BUILD_TIMESTAMP:{BUILD_TIMESTAMP}\n")?; }
702 if self.BUILD_TIME_2822 { writeln!(f, "BUILD_TIME_2822:{BUILD_TIME_2822}\n")?; }
703 if self.BUILD_TIME_3339 { writeln!(f, "BUILD_TIME_3339:{BUILD_TIME_3339}\n")?; }
704 if self.CARGO_MANIFEST_DIR { writeln!(f, "CARGO_MANIFEST_DIR:{CARGO_MANIFEST_DIR}\n")?; }
705 if self.CARGO_TREE { writeln!(f, "CARGO_TREE:{CARGO_TREE}\n")?; }
706 if self.CARGO_VERSION { writeln!(f, "CARGO_VERSION:{CARGO_VERSION}\n")?; }
707 if self.COMMITS_SINCE_TAG { writeln!(f, "COMMITS_SINCE_TAG:{COMMITS_SINCE_TAG}\n")?; }
708 if self.COMMIT_AUTHOR { writeln!(f, "COMMIT_AUTHOR:{COMMIT_AUTHOR}\n")?; }
709 if self.COMMIT_DATE { writeln!(f, "COMMIT_DATE:{COMMIT_DATE}\n")?; }
710 if self.COMMIT_DATE_2822 { writeln!(f, "COMMIT_DATE_2822:{COMMIT_DATE_2822}\n")?; }
711 if self.COMMIT_DATE_3339 { writeln!(f, "COMMIT_DATE_3339:{COMMIT_DATE_3339}\n")?; }
712 if self.COMMIT_EMAIL { writeln!(f, "COMMIT_EMAIL:{COMMIT_EMAIL}\n")?; }
713 if self.COMMIT_HASH { writeln!(f, "COMMIT_HASH:{COMMIT_HASH}\n")?; }
714 if self.COMMIT_TIMESTAMP { writeln!(f, "COMMIT_TIMESTAMP:{COMMIT_TIMESTAMP}\n")?; }
715 if self.GIT_CLEAN { writeln!(f, "GIT_CLEAN:{GIT_CLEAN}\n")?; }
716 if self.GIT_STATUS_FILE { writeln!(f, "GIT_STATUS_FILE:{GIT_STATUS_FILE}\n")?; }
717 if self.LAST_TAG { writeln!(f, "LAST_TAG:{LAST_TAG}\n")?; }
718 if self.PKG_DESCRIPTION { writeln!(f, "PKG_DESCRIPTION:{PKG_DESCRIPTION}\n")?; }
719 if self.PKG_VERSION { writeln!(f, "PKG_VERSION:{PKG_VERSION}\n")?; }
720 if self.PKG_VERSION_MAJOR { writeln!(f, "PKG_VERSION_MAJOR:{PKG_VERSION_MAJOR}\n")?; }
721 if self.PKG_VERSION_MINOR { writeln!(f, "PKG_VERSION_MINOR:{PKG_VERSION_MINOR}\n")?; }
722 if self.PKG_VERSION_PATCH { writeln!(f, "PKG_VERSION_PATCH:{PKG_VERSION_PATCH}\n")?; }
723 if self.PKG_VERSION_PRE { writeln!(f, "PKG_VERSION_PRE:{PKG_VERSION_PRE}\n")?; }
724 if self.PROJECT_NAME { writeln!(f, "PROJECT_NAME:{PROJECT_NAME}\n")?; }
725 if self.RUST_CHANNEL { writeln!(f, "RUST_CHANNEL:{RUST_CHANNEL}\n")?; }
726 if self.RUST_VERSION { writeln!(f, "RUST_VERSION:{RUST_VERSION}\n")?; }
727 if self.SHORT_COMMIT { writeln!(f, "SHORT_COMMIT:{SHORT_COMMIT}\n")?; }
728 if self.TAG { writeln!(f, "TAG:{TAG}\n")?; }
729 if self.VERSION { writeln!(f, "VERSION:{VERSION}\n")?; }
730 if self.CLAP_LONG_VERSION { writeln!(f, "CLAP_LONG_VERSION:{CLAP_LONG_VERSION}\n")?; }
731 Ok(())
732 }
733}
734
735#[allow(dead_code)]
738#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
739pub fn print_build_in() {
740 println!("{}", BuildInfoDisplay::default());
741}
742