Skip to content

Commit f1a7376

Browse files
committed
fix arm64 .gdextension paths
1 parent e27a69e commit f1a7376

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ReadMe.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ To register the GDExtension library with Godot, you need to create two files rel
6363
windows.release.x86_64 = "res://../rust/target/release/{my-ext}.dll"
6464
macos.debug = "res://../rust/target/debug/{my-ext}.dylib"
6565
macos.release = "res://../rust/target/release/{my-ext}.dylib"
66-
macos.debug.arm64 = "res://../rust/target/aarch64-apple-darwin/debug/{my-ext}.dylib"
67-
macos.release.arm64 = "res://../rust/target/aarch64-apple-darwin/release/{my-ext}.dylib"
66+
macos.debug.arm64 = "res://../rust/target/debug/{my-ext}.dylib"
67+
macos.release.arm64 = "res://../rust/target/release/{my-ext}.dylib"
6868
```
69-
(Note that for exporting your project, you'll need to use paths inside `res://`).
69+
> **Note**: for exporting your project, you'll need to use paths inside `res://`
70+
71+
> **Note**: If you specify your cargo compilation target via the `--target` flag or a `.cargo/config.toml` file, the rust library will be placed in a path name that includes target architecture, and the `.gdextension` library paths will need to match. E.g. for M1 Macs (`macos.debug.arm64` and `macos.release.arm64`) the path would be `"res://../rust/target/aarch64-apple-darwin/debug/{my-ext}.dylib"`
7072
7173
2. A second file `res://.godot/extension_list.cfg` should be generated once you open the Godot editor for the first time.
7274
If not, you can also manually create it, simply containing the Godot path to your `.gdextension` file:

examples/dodge-the-creeps/godot/DodgeTheCreeps.gdextension

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ windows.debug.x86_64 = "res://../../../target/debug/dodge_the_creeps.dll"
88
windows.release.x86_64 = "res://../../../target/release/dodge_the_creeps.dll"
99
macos.debug = "res://../../../target/debug/libdodge_the_creeps.dylib"
1010
macos.release = "res://../../../target/release/libdodge_the_creeps.dylib"
11-
macos.debug.arm64 = "res://../../../target/aarch64-apple-darwin/debug/libdodge_the_creeps.dylib"
12-
macos.release.arm64 = "res://../../../target/aarch64-apple-darwin/release/libdodge_the_creeps.dylib"
11+
macos.debug.arm64 = "res://../../../target/debug/libdodge_the_creeps.dylib"
12+
macos.release.arm64 = "res://../../../target/release/libdodge_the_creeps.dylib"

itest/godot/itest.gdextension

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ windows.debug.x86_64 = "res://../../target/debug/itest.dll"
88
windows.release.x86_64 = "res://../../target/release/itest.dll"
99
macos.debug = "res://../../target/debug/libitest.dylib"
1010
macos.release = "res://../../target/release/libitest.dylib"
11-
macos.debug.arm64 = "res://../../target/aarch64-apple-darwin/debug/libitest.dylib"
12-
macos.release.arm64 = "res://../../target/aarch64-apple-darwin/release/libitest.dylib"
11+
macos.debug.arm64 = "res://../../target/debug/libitest.dylib"
12+
macos.release.arm64 = "res://../../target/release/libitest.dylib"

0 commit comments

Comments
 (0)