FROM --platform=linux/amd64 rust:1.85-bookworm # Install build dependencies and MinGW cross-compiler RUN apt-get update && apt-get install -y \ cmake \ nasm \ meson \ ninja-build \ mingw-w64 \ && rm -rf /var/lib/apt/lists/* # Add the Windows target RUN rustup target add x86_64-pc-windows-gnu # Configure cargo for cross-compilation ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc ENV CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc ENV CXX_x86_64_pc_windows_gnu=x86_64-w64-mingw32-g++ WORKDIR /build