Add rust to compile env

This commit is contained in:
Aditya Kulkarni
2019-06-19 10:47:26 -07:00
parent 74bb8a4e95
commit 54f68921aa

View File

@@ -42,4 +42,14 @@ RUN cd /opt && \
cd /opt/mxe && \
make -j$(nproc) MXE_TARGETS=x86_64-w64-mingw32.static qtbase qtwebsockets
# Add rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.32.0 -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
RUN ~/.cargo/bin/rustup target add x86_64-pc-windows-gnu
# Append the linker to the cargo config for Windows cross compile
RUN echo "[target.x86_64-pc-windows-gnu]" >> ~/.cargo/config && \
echo "linker = 'x86_64-w64-mingw32.static-gcc'" >> ~/.cargo/config
ENV CC_x86_64_pc_windows_gnu="x86_64-w64-mingw32.static-gcc"
ENV PATH="/opt/mxe/usr/bin:${PATH}"