diff --git a/buildSrc/src/main/groovy/multiloader-loader.gradle b/buildSrc/src/main/groovy/multiloader-loader.gradle index ffc9d39..7be09e5 100644 --- a/buildSrc/src/main/groovy/multiloader-loader.gradle +++ b/buildSrc/src/main/groovy/multiloader-loader.gradle @@ -64,18 +64,6 @@ publishMods { minecraftVersions.add(minecraft_version) }*/ - github { - repository = "ryanhcode/sable" - accessToken = providers.environmentVariable("GITHUB_TOKEN") - tagName = "mc$minecraft_version-$project.version-$project.name" - commitish = "main" - - file.unset() - file.unsetConvention() - - allowEmptyFiles = true - } - modrinth { accessToken = providers.environmentVariable("MODRINTH_TOKEN") projectId = "T9PomCSv" @@ -91,4 +79,16 @@ publishMods { embeds("veil") } + + github { + repository = "ryanhcode/sable" + accessToken = providers.environmentVariable("GITHUB_TOKEN") + tagName = "mc$minecraft_version-$project.version-$project.name" + commitish = "main" + + file.unset() + file.unsetConvention() + + allowEmptyFiles = true + } } \ No newline at end of file diff --git a/common/build.gradle b/common/build.gradle index 516801a..25a0614 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,5 +1,4 @@ import org.apache.tools.ant.taskdefs.condition.Os -import org.gradle.api.internal.tasks.userinput.UserInputHandler plugins { id 'multiloader-common' @@ -66,6 +65,14 @@ tasks.register('compileRustMac', Exec) { dependsOn createContainersDirectory } +tasks.register('compileRustLinuxAArch64', Exec) { + group = 'rust' + workingDir rustProjectDir + commandLine dockerCommand + args 'cargo', 'zigbuild', '--release', '--target', 'aarch64-unknown-linux-gnu.2.17' + dependsOn createContainersDirectory +} + tasks.register('compileRustLinux', Exec) { group = 'rust' workingDir rustProjectDir @@ -86,7 +93,7 @@ tasks.register('buildRustNatives') { group = 'build' description = 'Compiles all Rust natives and moves them to resources.' - dependsOn compileRustMac, compileRustLinux, compileRustWindows + dependsOn compileRustMac, compileRustLinux, compileRustLinuxAArch64, compileRustWindows finalizedBy copyRustNatives } @@ -99,8 +106,10 @@ tasks.register('copyRustNatives', Copy) { def moves = [ [src: "target/aarch64-apple-darwin/release/libsable_rapier.dylib", dest: "sable_rapier_aarch64_macos.dylib"], [src: "target/x86_64-unknown-linux-gnu/release/libsable_rapier.so", dest: "sable_rapier_x86_64_linux.so"], + [src: "target/aarch64-unknown-linux-gnu/release/libsable_rapier.so", dest: "sable_rapier_aarch64_linux.so"], [src: "target/x86_64-pc-windows-gnu/release/sable_rapier.dll", dest: "sable_rapier_x86_64_windows.dll"] ] + moves.forEach { map -> from(file("$rustProjectDir/${map.src}")) { rename { map.dest } diff --git a/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_linux.so b/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_linux.so new file mode 100755 index 0000000..0231e14 Binary files /dev/null and b/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_linux.so differ diff --git a/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_macos.dylib b/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_macos.dylib index 297d5fc..583df52 100755 Binary files a/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_macos.dylib and b/common/src/main/resources/natives/sable_rapier/sable_rapier_aarch64_macos.dylib differ diff --git a/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_linux.so b/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_linux.so index 2c354b7..0ca8c69 100755 Binary files a/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_linux.so and b/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_linux.so differ diff --git a/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_windows.dll b/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_windows.dll index 42efc8b..2169292 100755 Binary files a/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_windows.dll and b/common/src/main/resources/natives/sable_rapier/sable_rapier_x86_64_windows.dll differ diff --git a/common/src/main/rust/Dockerfile b/common/src/main/rust/Dockerfile index 06b1914..0489ade 100644 --- a/common/src/main/rust/Dockerfile +++ b/common/src/main/rust/Dockerfile @@ -7,5 +7,6 @@ RUN rustup default $RUST_VERSION RUN rustup target add x86_64-pc-windows-gnu RUN rustup target add aarch64-apple-darwin RUN rustup target add x86_64-unknown-linux-gnu +RUN rustup target add aarch64-unknown-linux-gnu WORKDIR / diff --git a/common/src/main/rust/rapier/.cargo/config.toml b/common/src/main/rust/rapier/.cargo/config.toml index ed2bc14..f722478 100644 --- a/common/src/main/rust/rapier/.cargo/config.toml +++ b/common/src/main/rust/rapier/.cargo/config.toml @@ -1,2 +1,2 @@ [target.x86_64-pc-windows-gnu] -rustflags = ["-C", "link-arg=/TIMESTAMP:0"] \ No newline at end of file +rustflags = ["-C", "link-arg=-Wl,-Brepro"]