2023-10-24 03:46:36 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Install Rust
|
|
|
|
RUSTUP_VERSION=1.26.0
|
2023-11-16 14:47:09 +00:00
|
|
|
RUST_VERSION=1.74.0
|
2023-10-24 03:46:36 +00:00
|
|
|
RUST_ARCH="x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
|
|
|
|
curl -o rustup-init $RUSTUP_URL
|
|
|
|
|
|
|
|
export RUSTUP_HOME="/usr/local/rustup"
|
|
|
|
export CARGO_HOME="/usr/local/cargo"
|
|
|
|
export PATH="/usr/local/cargo/bin:$PATH"
|
|
|
|
|
|
|
|
chmod +x rustup-init;
|
|
|
|
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION;
|
|
|
|
rm rustup-init;
|
|
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
|
|
|
|
|
2023-11-21 08:56:37 +00:00
|
|
|
cargo install cargo-c --version 0.9.28+cargo-0.75.0
|
2023-10-24 03:46:36 +00:00
|
|
|
|
|
|
|
rustup --version
|
|
|
|
cargo --version
|
|
|
|
rustc --version
|