11import org.apache.tools.ant.taskdefs.condition.Os
2- import org.gradle.api.internal.tasks.userinput.UserInputHandler
32
43plugins {
54 id ' multiloader-common'
@@ -66,6 +65,14 @@ tasks.register('compileRustMac', Exec) {
6665 dependsOn createContainersDirectory
6766}
6867
68+ tasks. register(' compileRustLinuxAArch64' , Exec ) {
69+ group = ' rust'
70+ workingDir rustProjectDir
71+ commandLine dockerCommand
72+ args ' cargo' , ' zigbuild' , ' --release' , ' --target' , ' aarch64-unknown-linux-gnu'
73+ dependsOn createContainersDirectory
74+ }
75+
6976tasks. register(' compileRustLinux' , Exec ) {
7077 group = ' rust'
7178 workingDir rustProjectDir
@@ -86,7 +93,7 @@ tasks.register('buildRustNatives') {
8693 group = ' build'
8794 description = ' Compiles all Rust natives and moves them to resources.'
8895
89- dependsOn compileRustMac, compileRustLinux, compileRustWindows
96+ dependsOn compileRustMac, compileRustLinux, compileRustLinuxAArch64, compileRustWindows
9097 finalizedBy copyRustNatives
9198}
9299
@@ -99,8 +106,10 @@ tasks.register('copyRustNatives', Copy) {
99106 def moves = [
100107 [src : " target/aarch64-apple-darwin/release/libsable_rapier.dylib" , dest : " sable_rapier_aarch64_macos.dylib" ],
101108 [src : " target/x86_64-unknown-linux-gnu/release/libsable_rapier.so" , dest : " sable_rapier_x86_64_linux.so" ],
109+ [src : " target/aarch64-unknown-linux-gnu/release/libsable_rapier.so" , dest : " sable_rapier_aarch64_linux.so" ],
102110 [src : " target/x86_64-pc-windows-gnu/release/sable_rapier.dll" , dest : " sable_rapier_x86_64_windows.dll" ]
103111 ]
112+
104113 moves. forEach { map ->
105114 from(file(" $rustProjectDir /${ map.src} " )) {
106115 rename { map. dest }
0 commit comments