godot_boids/rust/build.sh

18 lines
949 B
Bash
Raw Normal View History

2024-09-12 18:37:47 +03:00
#!/bin/sh
2024-09-12 19:36:59 +03:00
if [ "$1" == "release" ]; then
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
mv target/x86_64-unknown-linux-gnu/release/libboids.so ../addons/boids/lib/boids.x86.so
mv target/x86_64-pc-windows-gnu/release/boids.dll ../addons/boids/lib/boids.x86.dll
mv target/wasm32-unknown-emscripten/release/boids.wasm ../addons/boids/lib/boids.wasm
else
cross build --target x86_64-unknown-linux-gnu
cross build --target x86_64-pc-windows-gnu
cross +nightly build -Zbuild-std --target wasm32-unknown-emscripten
mv target/x86_64-unknown-linux-gnu/debug/libboids.so ../addons/boids/lib/boids.x86.editor.so
mv target/x86_64-pc-windows-gnu/debug/boids.dll ../addons/boids/lib/boids.x86.editor.dll
mv target/wasm32-unknown-emscripten/debug/boids.wasm ../addons/boids/lib/boids.editor.wasm
fi