diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-04 14:29:34 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-04 14:29:34 +0800 |
| commit | 5991905ae9fb519a3a43c599c5515ba39c04e5fb (patch) | |
| tree | 3d9dcb37a30c9a17070c30c7964afec32a09435b /src/data/compile_info.rs.template | |
| parent | 57320aa7832d88c8e60fa0423df31cf71361ff58 (diff) | |
Add compile-time version and build information
- Add build script to generate compile_info.rs with build metadata -
Include version, build date, target platform, and toolchain info - Add
version command to both jv and jvv binaries - Update help documentation
with version information - Ignore generated compile_info.rs in git
Diffstat (limited to 'src/data/compile_info.rs.template')
| -rw-r--r-- | src/data/compile_info.rs.template | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/data/compile_info.rs.template b/src/data/compile_info.rs.template new file mode 100644 index 0000000..7720d2b --- /dev/null +++ b/src/data/compile_info.rs.template @@ -0,0 +1,20 @@ +pub struct CompileInfo { + pub date: String, + pub target: String, + pub platform: String, + pub toolchain: String, + + pub cli_version: String, +} + +impl Default for CompileInfo { + fn default() -> Self { + Self { + date: "{date}".to_string(), + target: "{target}".to_string(), + platform: "{platform}".to_string(), + toolchain: "{toolchain}".to_string(), + cli_version: "{version}".to_string(), + } + } +} |
