dev/rust: rewrite to use rustup
This commit is contained in:
parent
06d240350d
commit
2357724571
|
@ -4,16 +4,16 @@ source env.zsh
|
|||
|
||||
install() {
|
||||
case $(_os) in
|
||||
macos) brew install rust
|
||||
cargo install racer
|
||||
;;
|
||||
arch) pacaur --needed --noconfirm -S rust rust-doc rust-racer ;;
|
||||
macos) brew install rustup ;;
|
||||
arch) pacaur --needed --noconfirm -S rustup ;;
|
||||
esac
|
||||
_ensure_repo rust-lang/rust $RUST_SRC_PATH
|
||||
rustup install stable
|
||||
rustup component add rust-src
|
||||
cargo install racer
|
||||
}
|
||||
|
||||
update() {
|
||||
cd $RUST_SRC_PATH && git pull
|
||||
rustup update
|
||||
}
|
||||
|
||||
# link() {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export RUST_SRC_PATH=$XDG_DATA_HOME/rust/src
|
||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||
|
||||
path=( $CARGO_HOME/bin $path )
|
||||
|
|
Loading…
Reference in a new issue