Add native linux/win binaries to the pipeline

Switch the builder image to rust:1-bookworm — bevy's native linux
build needs glibc + alsa/udev, which does not build against musl —
and add the x86_64-pc-windows-gnu target with mingw-w64 for the
windows cross-compile (linker set from the Makefile, no per-repo
.cargo/config). Mac stays out: darwin needs osxcross, same as the
ebitengine mac plan. Builder steps pull the image on every run so
:latest updates reach the runner.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 23:37:48 +02:00
co-authored by Claude Fable 5
parent feb671023a
commit 6dd21822cc
4 changed files with 109 additions and 17 deletions
+15 -5
View File
@@ -2,10 +2,16 @@
# wasm32-unknown-unknown target and the wasm-bindgen CLI preinstalled,
# so the pipeline's build step does not download them on every run.
#
# Debian-based (glibc) rather than alpine: the native linux binary needs
# glibc + alsa/udev dev libs (wgpu/winit), which bevy cannot build against
# musl. The windows binary is cross-compiled with mingw-w64
# (x86_64-pc-windows-gnu target). Mac is not cross-compiled here — that
# is the same osxcross story as the ebitengine mac targets.
#
# WASM_BINDGEN_VERSION must match the `wasm-bindgen` crate version pinned
# in the game repos' Cargo.toml (see README) — rebuild and retag this image
# when bumping it. The CLI is the x86_64 musl binary, so the image must be
# built for linux/amd64.
# when bumping it. The CLI is the x86_64 musl binary (static, runs on
# glibc too), so the image must be built for linux/amd64.
#
# Build & push (the CI runner is linux/amd64):
# docker build --platform linux/amd64 -f builder.Dockerfile \
@@ -13,13 +19,17 @@
# -t git.teletypegames.org/internal/bevy-builder:latest .
# docker push git.teletypegames.org/internal/bevy-builder:latest
FROM rust:1-alpine
FROM rust:1-bookworm
ARG WASM_BINDGEN_VERSION=0.2.100
RUN apk add --no-cache musl-dev make zip curl git jq
RUN apt-get update && apt-get install -y --no-install-recommends \
make zip curl git jq pkg-config \
libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev \
gcc-mingw-w64-x86-64 \
&& rm -rf /var/lib/apt/lists/*
RUN rustup target add wasm32-unknown-unknown
RUN rustup target add wasm32-unknown-unknown x86_64-pc-windows-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 \