Fix missing linux-aarch64 rust-pruner natives (issue #29) - #30
Draft
MagicJinn wants to merge 1 commit into
Draft
Conversation
GitHub Actions previously built rust-pruner only on the host architecture of each runner (linux-x86_64 on ubuntu-latest), so published jars lacked natives/linux-aarch64/librust_pruner.so and backups failed on ARM64 Linux servers. Add ubuntu-24.04-arm to the rust native matrix so linux-aarch64 is built natively in CI, verify the library is staged and packaged, and extend Docker zigbuild cross-compile support for aarch64-unknown-linux-gnu when building from non-ARM hosts. Co-authored-by: MagicJinn <MagicJinn@mail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #29. On Linux ARM64 servers, backups fail with:
The Java loader already looks for
linux-aarch64whenos.archisaarch64/arm64, andrustNativeTargetslists the target, but CI never built or packaged that library.Root cause
buildall.ymlrunsbuildRuston each runner's host architecture only:ubuntu-latest→linux-x86_64windows-latest→windows-x86_64macos-latest→macos-aarch64No job produced
linux-aarch64, so release jars (e.g.chronosbackups-26.x-1.1.0-fabric.jar) ship without it.Note: the native library is used for world copy on all backup paths (not only when chunk pruning is enabled), so ARM64 Linux cannot run backups at all with current published builds.
Feasibility
Confirmed:
cargo +nightly zigbuild --release --target aarch64-unknown-linux-gnu(andaarch64-unknown-linux-gnu.2.17for old glibc) compiles successfully. Output is a validELF 64-bit ARM aarch64shared object.Changes
ubuntu-24.04-armto the rust native CI matrix solinux-aarch64is built natively and merged with other platform artifacts.natives/linux-aarch64/librust_pruner.sois staged and present in fabric jars.aarch64-unknown-linux-gnuwhen building from non-ARM hosts (e.g.-PchronosRustExtraTargets=linux-aarch64on x86_64 with Docker).Follow-up for users on 1.1.0
They need a new release built with this CI change. Until then, disabling pruning does not avoid the failure because
copyWorldToCachealso requires the native library.