From 5991905ae9fb519a3a43c599c5515ba39c04e5fb Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 4 Nov 2025 14:29:34 +0800 Subject: 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 --- src/data/compile_info.rs.template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/data/compile_info.rs.template (limited to 'src/data/compile_info.rs.template') 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(), + } + } +} -- cgit