#!/bin/bash # requires rustup and cross to be installed: # > curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # > cargo install cross # if cross build failes with "error: cannot produce proc-macro for clap_derive ..." during install, run: # > RUSTFLAGS="-C target-feature=-crt-static" cargo install cross . "$HOME/.cargo/env" # Rasperry PI Zero / 1 cross build -r --target=arm-unknown-linux-gnueabihf # Rasperry PI 2/3/4 cross build -r --target=armv7-unknown-linux-gnueabihf # Linux 32 Bit cross build -r --target=i686-unknown-linux-gnu # Linux 64 Bit cross build -r --target=x86_64-unknown-linux-gnu # Docker Alpine / Scratch cross build -r --target=x86_64-unknown-linux-musl