Files
runner-images/images/linux/scripts/installers/rust.sh
T

35 lines
939 B
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
################################################################################
## File: rust.sh
## Desc: Installs Rust
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/os.sh
export RUSTUP_HOME=/etc/skel/.rustup
export CARGO_HOME=/etc/skel/.cargo
2020-03-23 07:54:11 +07:00
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal
# Initialize environment variables
source $CARGO_HOME/env
# Install common tools
2020-03-23 07:54:11 +07:00
rustup component add rustfmt clippy
if isUbuntu22; then
cargo install bindgen cbindgen cargo-audit cargo-outdated
else
cargo install --locked bindgen cbindgen cargo-audit cargo-outdated
fi
2020-05-25 12:25:41 +03:00
# Cleanup Cargo cache
2020-07-13 12:16:14 +03:00
rm -rf ${CARGO_HOME}/registry/*
2020-05-25 12:25:41 +03:00
# Update /etc/environemnt
prependEtcEnvironmentPath '$HOME/.cargo/bin'
invoke_tests "Tools" "Rust"