Skip to content

Commit

Permalink
use godot double precision
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu committed Oct 14, 2024
1 parent b5c3753 commit 8ba8996
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
crate-type = ["cdylib"]

[features]
default = ["build2d", "test"]
default = ["build2d-f64", "test"]
test = []
build2d = ["single-dim2", "serde-serialize", "simd-stable"]
build3d = ["single-dim3", "serde-serialize", "simd-stable"]
Expand All @@ -19,7 +19,7 @@ build3d-f64 = ["double-dim3", "serde-serialize", "simd-stable"]
dim2 = []
dim3 = []
single = []
double = []
double = ["godot/double-precision"]
enhanced-determinism = ["rapier2d/enhanced-determinism", "rapier2d-f64/enhanced-determinism", "rapier3d/enhanced-determinism", "rapier3d-f64/enhanced-determinism"]
serde-serialize = ["serde", "hashbrown/serde", "bincode", "serde_json", "godot/serde", "rapier2d/serde-serialize", "rapier2d-f64/serde-serialize", "rapier3d/serde-serialize", "rapier3d-f64/serde-serialize" ]
simd-stable = ["rapier2d/simd-stable", "rapier2d-f64/simd-stable", "rapier3d/simd-stable", "rapier3d-f64/simd-stable"]
Expand Down
12 changes: 12 additions & 0 deletions scripts/build-dev-2d-f64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cargo fmt -- --config-path rustfmt.toml
cargo clippy --fix --allow-dirty
if [ "${OSTYPE#darwin}" != "$OSTYPE" ]; then
cargo build --features="build2d-f64,test" --no-default-features
echo "Running on macOS"
rm -f bin2d/addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/libgodot_rapier.macos.dylib
cp target/debug/libgodot_rapier.dylib bin2d/addons/godot-rapier2d/bin/libgodot_rapier.macos.framework/libgodot_rapier.macos.dylib
else
cargo build --features="build2d,test" --no-default-features --target=x86_64-unknown-linux-gnu
echo "Running on Linux"
cp target/x86_64-unknown-linux-gnu/debug/libgodot_rapier.so bin2d/addons/godot-rapier2d/bin/libgodot_rapier.linux.x86_64-unknown-linux-gnu.so
fi

0 comments on commit 8ba8996

Please sign in to comment.