Skip to content

Commit

Permalink
enhance: add rust to install_dep.sh (#29586)
Browse files Browse the repository at this point in the history
fix: #29585

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
  • Loading branch information
longjiquan authored Jan 7, 2024
1 parent 271edc6 commit 4b3de64
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ function install_linux_deps() {
else
echo "cmake version is $cmake_version"
fi
# install rust
if command -v cargo >/dev/null 2>&1; then
echo "cargo exists"
rustup install 1.73
rustup default 1.73
else
bash -c "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=1.73 -y" || { echo 'rustup install failed'; exit 1;}
source $HOME/.cargo/env
fi
}

function install_mac_deps() {
Expand All @@ -68,6 +77,15 @@ function install_mac_deps() {
fi

sudo ln -s "$(brew --prefix llvm@15)" "/usr/local/opt/llvm"
# install rust
if command -v cargo >/dev/null 2>&1; then
echo "cargo exists"
rustup install 1.73
rustup default 1.73
else
bash -c "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=1.73 -y" || { echo 'rustup install failed'; exit 1;}
source $HOME/.cargo/env
fi
}

if ! command -v go &> /dev/null
Expand Down

0 comments on commit 4b3de64

Please sign in to comment.