From 4cccc5d093bed8abbe35689c061486b79c44c558 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 24 Dec 2025 14:52:28 +0800 Subject: Add build script for compile info and installer generation --- src/data.rs | 2 ++ src/data/compile_info.rs.template | 20 ++++++++++++++++++++ src/lib.rs | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 src/data.rs create mode 100644 src/data/compile_info.rs.template (limited to 'src') diff --git a/src/data.rs b/src/data.rs new file mode 100644 index 0000000..036fd98 --- /dev/null +++ b/src/data.rs @@ -0,0 +1,2 @@ +#[allow(dead_code)] +pub mod compile_info; diff --git a/src/data/compile_info.rs.template b/src/data/compile_info.rs.template new file mode 100644 index 0000000..21909eb --- /dev/null +++ b/src/data/compile_info.rs.template @@ -0,0 +1,20 @@ +pub struct CoreCompileInfo { + pub date: String, + pub target: String, + pub platform: String, + pub toolchain: String, + + pub vcs_version: String, +} + +impl Default for CoreCompileInfo { + fn default() -> Self { + Self { + date: "{date}".to_string(), + target: "{target}".to_string(), + platform: "{platform}".to_string(), + toolchain: "{toolchain}".to_string(), + vcs_version: "{version}".to_string(), + } + } +} diff --git a/src/lib.rs b/src/lib.rs index 6d94067..361fb8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +/// Data +pub mod data; + // Feature `vcs` #[cfg(feature = "vcs")] pub mod vcs { -- cgit