1
0
mirror of https://github.com/medigor/example-native-api-rs.git synced 2024-11-21 17:56:37 +02:00
example-native-api-rs/build-with-docker-windows
2023-12-10 20:07:47 +03:00

15 lines
379 B
Bash
Executable File

#!/bin/sh
if which podman>/dev/null;
then
PROGRAM=podman;
else
PROGRAM=docker;
fi
$PROGRAM run -it --rm -v $PWD:/project docker.io/library/rust:1-bullseye sh -c \
"rustup target add x86_64-pc-windows-gnu && \
apt-get -y update && \
apt-get -y install mingw-w64 && \
cargo build --manifest-path /project/Cargo.toml --release --target x86_64-pc-windows-gnu"