// Use of a mod or pub mod is not actually necessary. pub mod built_info { #![allow(clippy::allow_attributes_without_reason, reason = "generated code")] #![allow(clippy::pedantic, reason = "generated code")] // The file has been placed there by the build script. include!(concat!(env!("OUT_DIR"), "/built.rs")); } pub fn version_and_features_line() -> String { // Version, commit, and features line // ex: starkingdoms v0.1.0 37f85fab-dirty +native +server +client +particle_editor let commit = format!("{}{}", built_info::GIT_COMMIT_HASH_SHORT.unwrap_or(""), if let Some(d) = built_info::GIT_DIRTY && d { "-dirty" } else { "" }); // TODO let mut line = format!("starkingdoms v{} {commit}", env!("CARGO_PKG_VERSION")); if cfg!(feature = "platform_native") { line += " +native"; } if cfg!(feature = "platform_wasm") { line += " +wasm"; } if cfg!(feature = "target_server") { line += " +server"; } if cfg!(feature = "target_client") { line += " +client"; } if cfg!(feature = "target_particle_editor") { line += " +particle_editor"; } line }