Files
wehub-resource-sync cb15c5e0d8
CI / Rust (windows-latest - x86_64-pc-windows-msvc) (push) Waiting to run
CI / Native E2E Tests (push) Blocked by required conditions
CI / Windows Integration Test (push) Blocked by required conditions
CI / Version Sync Check (push) Waiting to run
CI / Rust (push) Waiting to run
CI / Dashboard (push) Waiting to run
CI / Sandbox Package (push) Waiting to run
CI / Rust (macos-latest - aarch64-apple-darwin) (push) Waiting to run
CI / Rust (macos-latest - x86_64-apple-darwin) (push) Waiting to run
CI / Global Install (macos-latest) (push) Blocked by required conditions
CI / Global Install (ubuntu-latest) (push) Blocked by required conditions
CI / Global Install (windows-latest) (push) Blocked by required conditions
Release / Check for new version (push) Has been cancelled
Release / Build macOS ARM64 (push) Has been cancelled
Release / Build macOS x64 (push) Has been cancelled
Release / Build Linux ARM64 (push) Has been cancelled
Release / Build Linux musl ARM64 (push) Has been cancelled
Release / Build Linux musl x64 (push) Has been cancelled
Release / Build Linux x64 (push) Has been cancelled
Release / Build Windows x64 (push) Has been cancelled
Release / Publish to npm (push) Has been cancelled
Release / Publish sandbox package to npm (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:58 +08:00

35 lines
1.1 KiB
INI

# Multi-platform Rust cross-compilation image
FROM rust:1.88-bookworm
# Install cross-compilation toolchains
RUN apt-get update && apt-get install -y \
gcc-aarch64-linux-gnu \
gcc-x86-64-linux-gnu \
libc6-dev-arm64-cross \
libc6-dev-amd64-cross \
mingw-w64 \
&& rm -rf /var/lib/apt/lists/*
# Add Rust targets for all platforms
RUN rustup target add \
x86_64-unknown-linux-gnu \
aarch64-unknown-linux-gnu \
x86_64-unknown-linux-musl \
aarch64-unknown-linux-musl \
x86_64-apple-darwin \
aarch64-apple-darwin \
x86_64-pc-windows-gnu
# Install cargo-zigbuild for easier cross-compilation (especially macOS)
RUN curl -sSL https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz | tar -xJ -C /opt \
&& ln -s /opt/zig-linux-x86_64-0.13.0/zig /usr/local/bin/zig
RUN cargo install cargo-zigbuild --version 0.22.3 --locked
# Configure linkers for cross-compilation
RUN mkdir -p /.cargo
RUN echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"\n\n[target.x86_64-pc-windows-gnu]\nlinker = "x86_64-w64-mingw32-gcc"\n' > /.cargo/config.toml
WORKDIR /build
ENTRYPOINT ["/bin/bash"]