diff --git a/README.md b/README.md index a0dcccc..d139fcd 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ it's just a standard rust project under `rust`, so make sure you have `rustup` i also don't forget to have godot installed and available in your `PATH` (the extension currently targets 4.3). - **cargo features** - - enable `stats` feature to let the extension log into godot console some times for how its processing the boids. + - enable `stats` feature to let the extension log into godot console timings for how long its processing the boids. ## todo diff --git a/addons/boids/boids.gdextension b/addons/boids/boids.gdextension index 88d151b..f2488c3 100644 --- a/addons/boids/boids.gdextension +++ b/addons/boids/boids.gdextension @@ -8,15 +8,15 @@ linux.debug.x86_64 = "res://addons/boids/lib/boids.x86_64.so" linux.release.x86_64 = "res://addons/boids/lib/boids.x86_64.so" windows.debug.x86_64 = "res://addons/boids/lib/boids.x86_64.dll" windows.release.x86_64 = "res://addons/boids/lib/boids.x86_64.dll" -macos.release = "res://addons/boids/lib/libboids.x86_64.dylib" -macos.release.arm64 = "res://addons/boids/lib/libboids.arm64.dylib" -web.debug.wasm32 = "res://addons/boids/lib/boids.wasm32.wasm" -web.release.wasm32 = "res://addons/boids/lib/boids.wasm32.wasm" +macos.release = "res://addons/boids/lib/boids.x86_64.dylib" +macos.release.arm64 = "res://addons/boids/lib/boids.arm64.dylib" +web.debug.wasm32 = "res://addons/boids/lib/boids.wasm" +web.release.wasm32 = "res://addons/boids/lib/boids.wasm" [icons] -BoidProperties = "res://addons/boids/resources/boid_properties.svg" +BoidProperties = "res://addons/boids/resources/boid_properties.svg" FlockProperties = "res://addons/boids/resources/flock_properties.svg" -Flock2D = "res://addons/boids/resources/flock_2d.svg" -Boid2D = "res://addons/boids/resources/boid_2d.svg" -Flock3D = "res://addons/boids/resources/flock_3d.svg" -Boid3D = "res://addons/boids/resources/boid_3d.svg" +Flock2D = "res://addons/boids/resources/flock_2d.svg" +Boid2D = "res://addons/boids/resources/boid_2d.svg" +Flock3D = "res://addons/boids/resources/flock_3d.svg" +Boid3D = "res://addons/boids/resources/boid_3d.svg" diff --git a/justfile b/justfile index 19fd177..9a1f12e 100644 --- a/justfile +++ b/justfile @@ -15,7 +15,7 @@ _just-cmd *FLAGS="": build $target=(host-target) *FLAGS="": _setup-env cd rust; cross build {{FLAGS}} --profile {{profile}} --target {{target}} install $target=(host-target): _setup-env - mv -f rust/target/{{target}}/{{`$env.profiledir`}}/{{`$env.libprefix`}}boids.{{`$env.ext`}} {{artifact-dir}}/boids.{{`$env.arch`}}.{{`$env.ext`}} + mv -f rust/target/{{target}}/{{`$env.profiledir`}}/{{`$env.libprefix`}}boids.{{`$env.ext`}} {{artifact-dir}}/boids{{`$env.arch`}}.{{`$env.ext`}} build-install target=(host-target) *FLAGS="": (build target FLAGS) (install target) wasm: (build-install 'wasm32-unknown-emscripten' '+nightly' '-Zbuild-std') diff --git a/justfile.nu b/justfile.nu index 69a02d0..2f757f2 100644 --- a/justfile.nu +++ b/justfile.nu @@ -6,7 +6,14 @@ let exts = { def getext [] { $exts | get $env.target } def getlibprefix [] { if ($env.target | str contains "linux") { "lib" } else { "" } } -def getarch [] { $env.target | split row - | first } +def getarch [] { + let arch = $env.target | split row - | first + if ($arch == "wasm32") { + "" + } else { + "." + $arch + } +} def getprofiledir [] { if ($env.profile == 'dev') { "debug" } else { $env.profile }} def main [command: string] { diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml index 6e053ae..57e6e02 100644 --- a/rust/.cargo/config.toml +++ b/rust/.cargo/config.toml @@ -3,5 +3,6 @@ rustflags = [ "-C", "link-args=-sSIDE_MODULE=2", "-C", "link-args=-pthread", # was -sUSE_PTHREADS=1 in earlier emscripten versions "-C", "target-feature=+atomics,+bulk-memory,+mutable-globals", + "-Cllvm-args=-enable-emscripten-cxx-exceptions=0", "-Zlink-native-libraries=no" ] \ No newline at end of file