From 04d93e9290f5e4da532ef284aecc9a99abec8ea5 Mon Sep 17 00:00:00 2001 From: core Date: Sun, 26 Apr 2026 15:48:06 -0400 Subject: [PATCH] fix: remove buildscript that breaks things --- .build.yml | 4 +++- crates/unified/Cargo.toml | 5 +---- crates/unified/build.rs | 3 --- crates/unified/src/build_meta.rs | 32 -------------------------------- crates/unified/src/cli.rs | 12 +----------- crates/unified/src/main.rs | 1 - 6 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 crates/unified/build.rs delete mode 100644 crates/unified/src/build_meta.rs diff --git a/.build.yml b/.build.yml index 093cfb7d4513aa2fe15b9d3f60c7889a9f3629f0..2879e39ecc9264a416fa3b9c190343656d149954 100644 --- a/.build.yml +++ b/.build.yml @@ -17,9 +17,11 @@ tasks: echo '. "$HOME/.cargo/env"' > ~/.profile source ~/.profile rustup target add wasm32-unknown-unknown - sudo apk add zlib zlib-dev wget + sudo apk add zlib zlib-dev wget binaryen sudo wget https://coredoes.dev/sccache -O /usr/local/bin/sccache sudo chmod 0755 /usr/local/bin/sccache + curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + cargo binstall wasm-bindgen --version 0.2.118 - web_client: | source ~/.profile cd starkingdoms diff --git a/crates/unified/Cargo.toml b/crates/unified/Cargo.toml index a2044be0a7d4faa75069bbc8900b8039a498198b..1c886840575a41c8b8d686b05e9aed78ad66d639 100644 --- a/crates/unified/Cargo.toml +++ b/crates/unified/Cargo.toml @@ -78,14 +78,11 @@ bevy_egui = { version = "0.39", optional = true } leafwing-input-manager = { version = "0.20", optional = true } good_lp = { version = "1.15", default-features = false, features = ["clarabel"], optional = true } -[build-dependencies] -built = { version = "0.8", features = ["git2", "chrono"] } - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] ctrlc = { version = "3.5", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -wasm-bindgen = { version = "0.2" } +wasm-bindgen = { version = "0.2.118" } tracing-wasm = "0.2" console_error_panic_hook = "0.1" diff --git a/crates/unified/build.rs b/crates/unified/build.rs deleted file mode 100644 index 1723685917a02888c13b3a580d74a837c016e5d9..0000000000000000000000000000000000000000 --- a/crates/unified/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - built::write_built_file().expect("Failed to acquire build-time information"); -} \ No newline at end of file diff --git a/crates/unified/src/build_meta.rs b/crates/unified/src/build_meta.rs deleted file mode 100644 index 4c25a0fa8f1a4bdc2045b562297390835c2ee204..0000000000000000000000000000000000000000 --- a/crates/unified/src/build_meta.rs +++ /dev/null @@ -1,32 +0,0 @@ -// 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 = "native") { - line += " +native"; - } - if cfg!(feature = "wasm") { - line += " +wasm"; - } - if cfg!(feature = "server") { - line += " +server"; - } - if cfg!(feature = "client") { - line += " +client"; - } - if cfg!(feature = "particle_editor") { - line += " +particle_editor"; - } - - line -} \ No newline at end of file diff --git a/crates/unified/src/cli.rs b/crates/unified/src/cli.rs index 73bc700bd79094f235cfcc82a9f66ed3ef504f47..5ca995465ac6a772e46a8b10f5fbafb4442b41c9 100644 --- a/crates/unified/src/cli.rs +++ b/crates/unified/src/cli.rs @@ -1,6 +1,3 @@ -use crate::build_meta::built_info::{BUILT_TIME_UTC, HOST, RUSTC_VERSION, TARGET}; -use crate::build_meta::version_and_features_line; - #[cfg(not(any(feature = "client", feature = "server", feature = "particle_editor")))] compile_error!("You need to enable one or more of client, server, particle_editor features"); #[cfg(not(any(feature = "native", feature = "wasm")))] @@ -35,7 +32,7 @@ pub fn parse_args() -> StkArgs { } if pargs.contains(["-v", "--version"]) { - print_version(); + println!("{}",env!("CARGO_PKG_VERSION")); std::process::exit(0); } @@ -77,8 +74,6 @@ pub fn parse_args() -> StkArgs { } fn print_help() { - println!("{}\n", version_and_features_line()); - println!("\ USAGE: starkingdoms [FLAGS] [...] @@ -120,9 +115,4 @@ SERVER: println!(); } } -} - -fn print_version() { - println!("{}", version_and_features_line()); - println!("built on {BUILT_TIME_UTC} by {RUSTC_VERSION} on {HOST} for {TARGET}"); } \ No newline at end of file diff --git a/crates/unified/src/main.rs b/crates/unified/src/main.rs index b3272fc00898d9cfbaa1e6a11f0c07e663ae7815..eb70839c6d3f081f21c869d4f4bc42a266fca597 100644 --- a/crates/unified/src/main.rs +++ b/crates/unified/src/main.rs @@ -42,7 +42,6 @@ pub mod prelude; #[cfg(target_arch = "wasm32")] pub mod wasm_entrypoint; mod cli; -mod build_meta; mod thrust; use std::str::FromStr;