Use Rust via the rustup toolchain
This commit is contained in:
parent
9f10158f6d
commit
7f99eca6c3
4 changed files with 22 additions and 4 deletions
|
|
@ -14,8 +14,6 @@ DEB_PKGS=(
|
||||||
bluez
|
bluez
|
||||||
borgbackup
|
borgbackup
|
||||||
build-essential
|
build-essential
|
||||||
cargo
|
|
||||||
cargo-doc
|
|
||||||
catatonit
|
catatonit
|
||||||
curl
|
curl
|
||||||
direnv
|
direnv
|
||||||
|
|
@ -72,8 +70,6 @@ DEB_PKGS=(
|
||||||
ripgrep
|
ripgrep
|
||||||
rr
|
rr
|
||||||
rsync
|
rsync
|
||||||
rust-doc
|
|
||||||
rust-llvm
|
|
||||||
shellcheck
|
shellcheck
|
||||||
slurp
|
slurp
|
||||||
speedtest-cli
|
speedtest-cli
|
||||||
|
|
|
||||||
11
.config/setup/06-install-rust-toolchain.sh
Executable file
11
.config/setup/06-install-rust-toolchain.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#! /usr/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
tmpfile="$(mktemp)"
|
||||||
|
curl --fail --proto '=https' --show-error --silent --tlsv1.2 --output "${tmpfile}" https://sh.rustup.rs && \
|
||||||
|
sh "${tmpfile}" --no-modify-path -y && \
|
||||||
|
chmod o-rwx ~/.cargo/bin/*
|
||||||
|
rm "${tmpfile}" && \
|
||||||
|
rustup component add llvm-tools
|
||||||
|
|
@ -14,6 +14,11 @@ emacs_update() {
|
||||||
emacsclient --alternate-editor "" --reuse-frame --eval "(elpaca-pull-all t)" --no-wait > /dev/null
|
emacsclient --alternate-editor "" --reuse-frame --eval "(elpaca-pull-all t)" --no-wait > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rustup_update() {
|
||||||
|
echo Updating the rustup toolchain...
|
||||||
|
rustup update
|
||||||
|
}
|
||||||
|
|
||||||
cargo_update() {
|
cargo_update() {
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1)
|
cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1)
|
||||||
|
|
@ -38,6 +43,7 @@ podman_update() {
|
||||||
|
|
||||||
apt_update
|
apt_update
|
||||||
emacs_update
|
emacs_update
|
||||||
|
rustup_update
|
||||||
uv_update
|
uv_update
|
||||||
cargo_update
|
cargo_update
|
||||||
ghup
|
ghup
|
||||||
|
|
|
||||||
5
.profile
5
.profile
|
|
@ -21,6 +21,11 @@ if [ -d "$HOME/bin" ] ; then
|
||||||
PATH="$HOME/bin:$PATH"
|
PATH="$HOME/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Hook up Rust
|
||||||
|
if [ -f "$HOME/.cargo/env" ]; then
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME/.cargo/bin" ] ; then
|
if [ -d "$HOME/.cargo/bin" ] ; then
|
||||||
PATH="$HOME/.cargo/bin:$PATH"
|
PATH="$HOME/.cargo/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue