From 84ffc4ac1e46542647366d35f1bf068b1c75ea94 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Sun, 16 Aug 2026 20:57:55 +0200 Subject: [PATCH] Add the ARM64 cross toolchain, and follow the image to build/ Batocera and the ES-family handhelds run on ARM, where a linux_x64 binary will not start. The image gains the aarch64 cross compiler and the arm64 dev libraries the pipeline links against. The image itself also moved out of the internal package namespace, which did not travel with the repo during the org reorganization. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 4 ++-- builder.Dockerfile | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 28e6378..31e6cb0 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ binary — bevy loads it at runtime, it is not embedded. ```sh docker build --platform linux/amd64 -f builder.Dockerfile \ --build-arg WASM_BINDGEN_VERSION=0.2.100 \ - -t git.teletypegames.org/internal/bevy-builder:latest . -docker push git.teletypegames.org/internal/bevy-builder:latest + -t git.teletypegames.org/build/bevy-builder:latest . +docker push git.teletypegames.org/build/bevy-builder:latest ``` Detailed documentation lives on the wiki: `/development/bevy`. diff --git a/builder.Dockerfile b/builder.Dockerfile index f5e36d3..581c247 100644 --- a/builder.Dockerfile +++ b/builder.Dockerfile @@ -16,8 +16,8 @@ # Build & push (the CI runner is linux/amd64): # docker build --platform linux/amd64 -f builder.Dockerfile \ # --build-arg WASM_BINDGEN_VERSION=0.2.100 \ -# -t git.teletypegames.org/internal/bevy-builder:latest . -# docker push git.teletypegames.org/internal/bevy-builder:latest +# -t git.teletypegames.org/build/bevy-builder:latest . +# docker push git.teletypegames.org/build/bevy-builder:latest FROM rust:1-bookworm @@ -29,7 +29,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gcc-mingw-w64-x86-64 \ && rm -rf /var/lib/apt/lists/* -RUN rustup target add wasm32-unknown-unknown x86_64-pc-windows-gnu +# linux-arm64 cross-build (Raspberry Pi, Odroid, retro handhelds). Debian's +# main mirror carries arm64, so a plain `dpkg --add-architecture` is enough — +# no ports repository needed. The :arm64 -dev packages are what alsa-sys and +# libudev-sys link against; pkg-config finds them via PKG_CONFIG_PATH, which +# the pipeline sets. +RUN dpkg --add-architecture arm64 \ + && apt-get update && apt-get install -y --no-install-recommends \ + gcc-aarch64-linux-gnu libc6-dev-arm64-cross \ + libasound2-dev:arm64 libudev-dev:arm64 \ + libwayland-dev:arm64 libxkbcommon-dev:arm64 \ + && rm -rf /var/lib/apt/lists/* + +RUN rustup target add wasm32-unknown-unknown x86_64-pc-windows-gnu aarch64-unknown-linux-gnu RUN curl -sSL "https://github.com/rustwasm/wasm-bindgen/releases/download/${WASM_BINDGEN_VERSION}/wasm-bindgen-${WASM_BINDGEN_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | tar xz -C /usr/local/bin --strip-components=1 \