Piratewallet Lightclient Library and CLI interface (with modifications to support Qortal cross-chain trades)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.2 KiB

5 years ago
FROM rust:1.38
LABEL Description="Rust compile env for Linux + Windows (cross)"
RUN apt update
RUN apt install -y build-essential mingw-w64 gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add aarch64-unknown-linux-gnu
RUN rustup target add armv7-unknown-linux-gnueabihf
# Append the linker to the cargo config for Windows cross compile
RUN echo "[target.x86_64-pc-windows-gnu]" >> /usr/local/cargo/config && \
echo "linker = '/usr/bin/x86_64-w64-mingw32-gcc'" >> /usr/local/cargo/config
RUN echo "[target.aarch64-unknown-linux-gnu]" >> /usr/local/cargo/config && \
echo "linker = '/usr/bin/aarch64-linux-gnu-gcc'" >> /usr/local/cargo/config
RUN echo "[target.armv7-unknown-linux-gnueabihf]" >> /usr/local/cargo/config && \
5 years ago
echo "linker = '/usr/bin/arm-linux-gnueabihf-gcc'" >> /usr/local/cargo/config
5 years ago
ENV CC_x86_64_unknown_linux_musl="gcc"
ENV CC_aarch64_unknown_linux_gnu="aarch64-linux-gnu-gcc"
5 years ago
ENV CC_armv7_unknown_linux_gnueabhihf="arm-linux-gnueabihf-gcc"
5 years ago
5 years ago
# This is a bug fix for the windows cross compiler for Rust.
5 years ago
RUN cp /usr/x86_64-w64-mingw32/lib/crt2.o /usr/local/rustup/toolchains/1.38.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o