Files
runner-images-temp/images/macos/scripts/build/install-rust.sh
T

29 lines
776 B
Bash
Raw Normal View History

#!/bin/bash -e -o pipefail
2023-11-28 02:25:03 +01:00
################################################################################
## File: install-rust.sh
## Desc: Install Rust
################################################################################
source ~/utils/utils.sh
2020-09-10 14:34:08 +03:00
echo Installing Rustup...
brew_smart_install "rustup-init"
2020-09-10 14:34:08 +03:00
echo Installing Rust language...
rustup-init -y --no-modify-path --default-toolchain=stable --profile=minimal
echo Initialize environment variables...
CARGO_HOME=$HOME/.cargo
echo Install common tools...
rustup component add rustfmt clippy
if is_BigSur || is_Monterey; then
cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated
fi
2020-09-10 14:34:08 +03:00
echo Cleanup Cargo registry cached data...
rm -rf $CARGO_HOME/registry/*
invoke_tests "Rust"