Add compiler version & system information to panic error message

So that we stop constantly asking people about it.
This commit is contained in:
KtorZ
2023-10-06 14:45:25 +02:00
parent 524d0dadf5
commit a524836c94
3 changed files with 18 additions and 3 deletions

View File

@@ -132,3 +132,15 @@ pub fn compiler_version(include_commit_hash: bool) -> String {
format!("v{}", built_info::PKG_VERSION_MAJOR,)
}
}
pub fn compiler_info() -> String {
format!(
r#"
Operating System: {}
Architecture: {}
Version: {}"#,
built_info::CFG_OS,
built_info::CFG_TARGET_ARCH,
compiler_version(true),
)
}