rust: Use rustup's minimal profile

This commit is contained in:
Lzu Tao
2020-03-23 07:54:11 +07:00
parent 9b3924a23d
commit 444ab15a64
2 changed files with 6 additions and 10 deletions

View File

@@ -12,16 +12,14 @@ set -e
export RUSTUP_HOME=/usr/share/rust/.rustup export RUSTUP_HOME=/usr/share/rust/.rustup
export CARGO_HOME=/usr/share/rust/.cargo export CARGO_HOME=/usr/share/rust/.cargo
curl https://sh.rustup.rs -sSf | sh -s -- -y curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal
# Initialize environment variables # Initialize environment variables
source $CARGO_HOME/env source $CARGO_HOME/env
# Install common tools # Install common tools
rustup component add rustfmt rustup component add rustfmt clippy
rustup component add clippy cargo install bindgen cbindgen
cargo install bindgen
cargo install cbindgen
echo "Test installation of the Rust toochain" echo "Test installation of the Rust toochain"

View File

@@ -14,7 +14,7 @@ $env:CARGO_HOME="C:\Rust\.cargo"
Invoke-WebRequest -UseBasicParsing -Uri "https://win.rustup.rs/x86_64" -OutFile rustup-init.exe Invoke-WebRequest -UseBasicParsing -Uri "https://win.rustup.rs/x86_64" -OutFile rustup-init.exe
# Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y) # Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y)
.\rustup-init.exe -y .\rustup-init.exe -y --default-toolchain=stable --profile=minimal
# Delete rustup-init.exe when it's no longer needed # Delete rustup-init.exe when it's no longer needed
Remove-Item -Path .\rustup-init.exe Remove-Item -Path .\rustup-init.exe
@@ -24,10 +24,8 @@ Add-MachinePathItem "$env:CARGO_HOME\bin"
$env:Path = Get-MachinePath $env:Path = Get-MachinePath
# Install common tools # Install common tools
rustup component add rustfmt rustup component add rustfmt clippy
rustup component add clippy cargo install bindgen cbindgen
cargo install bindgen
cargo install cbindgen
# Run script at startup for all users # Run script at startup for all users
$cmdRustSymScript = @" $cmdRustSymScript = @"