#!/usr/bin/env zsh
curl https://sh.rustup.rs -sSf | sh -s -- -y

CARGO="$HOME/.cargo/bin/cargo"
RUSTUP="$HOME/.cargo/bin/rustup"

crates=(
  cargo-edit  # Add, remove, and upgrade cargo dependencies from the command line
  cargo-watch # Watch for file changes and run cargo commands
  hexyl       # A command-line hex viewer
  hyperfine   # A command-line benchmarking tool
  racer       # Code completion for rust
  tokei       # A fast cloc alternative
)

$CARGO add component rust-src
$CARGO install "${crates[@]///}"

#!/usr/bin/env zsh
curl https://sh.rustup.rs -sSf | sh -s -- -y

CARGO="$HOME/.cargo/bin/cargo"
RUSTUP="$HOME/.cargo/bin/rustup"

crates=(
  cargo-edit  # Add, remove, and upgrade cargo dependencies from the command line
  cargo-watch # Watch for file changes and run cargo commands
  hexyl       # A command-line hex viewer
  hyperfine   # A command-line benchmarking tool
  tokei       # A fast cloc alternative
)

components=(
  rls
  rust-analysis
  rust-src
)

$RUSTUP component add "${components[@]///}"
$CARGO install "${crates[@]///}"

Update / modernize rust crates setup
Update / modernize rust crates setup
