From 64a8f4e3ad8e89e363f1a7ba278ae9252d5c730b Mon Sep 17 00:00:00 2001 From: dusk Date: Fri, 13 Sep 2024 18:36:11 +0900 Subject: [PATCH] fix: rebuild libraries, fix paths again --- addons/boids/boids.gdextension | 9 ++++++++- addons/boids/lib/boids.x86.so | 3 +++ rust/Cargo.toml | 8 ++++++-- rust/build.sh | 9 +++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 addons/boids/lib/boids.x86.so create mode 100755 rust/build.sh diff --git a/addons/boids/boids.gdextension b/addons/boids/boids.gdextension index 3a3f0c0..e45d6fd 100644 --- a/addons/boids/boids.gdextension +++ b/addons/boids/boids.gdextension @@ -1,12 +1,19 @@ [configuration] entry_symbol = "gdext_rust_init" -compatibility_minimum = 4.2 +compatibility_minimum = 4.3 reloadable = true [libraries] +<<<<<<< HEAD linux.debug.x86_64 = "res://rust/target/debug/libboids.so" windows.debug.x86_64 = "res://rust/target/debug/boids.dll" linux.release.x86_64 = "res://addons/boids/lib/libboids.x86.so" +======= +linux.debug.x86_64 = "res://addons/boids/lib/boids.x86.so" +windows.debug.x86_64 = "res://addons/boids/lib/boids.x86.dll" +web.debug.wasm32 = "res://addons/boids/lib/boids.wasm" +linux.release.x86_64 = "res://addons/boids/lib/boids.x86.so" +>>>>>>> ca5733d (fix: rebuild libraries, fix paths again) windows.release.x86_64 = "res://addons/boids/lib/boids.x86.dll" macos.release = "res://addons/boids/lib/libboids.x86.dylib" macos.release.arm64 = "res://addons/boids/lib/libboids.arm64.dylib" diff --git a/addons/boids/lib/boids.x86.so b/addons/boids/lib/boids.x86.so new file mode 100755 index 0000000..ac20466 --- /dev/null +++ b/addons/boids/lib/boids.x86.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c61fbe29bc77fd9892921c28c727844ff545b128e6e0a399484421d42c6af628 +size 3885032 diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6c86991..3fde177 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -19,5 +19,9 @@ indexmap = "2.4.0" [target.wasm32-unknown-emscripten.dependencies] godot = { git = "https://github.com/godot-rust/gdext", branch = "master", features = ["api-4-3", "register-docs", "experimental-wasm", "lazy-function-tables"] } -[profile.dev] -opt-level = 1 \ No newline at end of file +[profile.release] +opt-level = 3 +strip = "debuginfo" +lto = "thin" +incremental = true +codegen-units = 256 diff --git a/rust/build.sh b/rust/build.sh new file mode 100755 index 0000000..9865ef5 --- /dev/null +++ b/rust/build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +cross build --release --target x86_64-unknown-linux-gnu +cross build --release --target x86_64-pc-windows-gnu +cross +nightly build -Zbuild-std --release --target wasm32-unknown-emscripten + +cp -f target/x86_64-unknown-linux-gnu/release/libboids.so ../addons/boids/lib/boids.x86.so +cp -f target/x86_64-pc-windows-gnu/release/boids.dll ../addons/boids/lib/boids.x86.dll +cp -f target/wasm32-unknown-emscripten/release/boids.wasm ../addons/boids/lib/boids.wasm