#!/bin/bash # based on https://gist.github.com/luser/a33e5070d1c55a7d2c46fe763a9d1543 set -e # activate cross compilation export PKG_CONFIG_ALLOW_CROSS="1" mkdir -p .cargo if [ -f .cargo/config ] then mv .cargo/config .cargo/config.bak fi # Point cargo at the cross-toolchain. cat > .cargo/config <