actions-base-image/install-rust.sh
asonix 4d97a758b9
Some checks failed
/ publish-docker (push) Has been cancelled
/ build (map[platform:linux/arm64 suffix:linux-arm64]) (push) Has been cancelled
/ publish-forgejo (push) Has been cancelled
/ build (map[platform:linux/amd64 suffix:linux-amd64]) (push) Has been cancelled
Add bindgen, clang & libs
2024-05-03 15:42:35 -05:00

26 lines
730 B
Bash

#!/usr/bin/env bash
set -xe
TOOLCHAIN=${1:-'stable'}
mkdir -p /opt
curl --proto '=https' --tlsv1.2 -sSfL 'https://sh.rustup.rs' -o /opt/rustup.sh
chmod +x /opt/rustup.sh
/opt/rustup.sh --profile minimal --default-toolchain $TOOLCHAIN -y
rm /opt/rustup.sh
curl --proto '=https' --tlsv1.2 -sSfL 'https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh' -o /opt/cargo-binstall.sh
chmod +x /opt/cargo-binstall.sh
/opt/cargo-binstall.sh
rm /opt/cargo-binstall.sh
rustup component add clippy
rustup target add x86_64-unknown-linux-musl
rustup target add armv7-unknown-linux-musleabihf
rustup target add aarch64-unknown-linux-musl
yes | cargo binstall bindgen-cli cargo-zigbuild