# 安裝 Rust :::success 您正在閱讀「[Rust Taiwan 2020 讀書會筆記](https://hackmd.io/@ballfish/Hy7jJN7WI)」的一節,歡迎點擊本頁上方的 <i class="fa fa-pencil btn btn-default disabled"></i> 協助編修。 ::: ## Linux or Unix or MacOS 輸入下面的指令即可 ```shell= curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` 若安裝完後發生問題,例如環境變數沒有自行設定好,可以輸入下面的指令 ```shell= source $HOME/.cargo/env ``` 或在 `~/.bash_profile` 輸入 ```shell= export PATH="$HOME/.cargo/bin:$PATH" ``` ## Windows 下載 [rustup.exe](https://win.rustup.rs) 安裝需要用到 C++ build tools for VS2013 或更高的版本,可以在 Visual Studio 的官網下載軟體後,在其他的安裝選項中找到 ## 更新 Rust 版本 ```shell= rustup update ``` ## 安裝 Rust 的其他版本 EX: 安裝 nightly 的版本 ```shell= rustup install nightly ``` 將 nightly 版本作為 default 版本 ```shell= rustup default nightly ``` ## 解除安裝 Rust 與 rustup ```shell= rustup self uninstall ``` ## Rust 版本的差異 - nightly: 每天的最新版本,但 bug 很多 - beta: nightly 的新 ~~bug~~ feature 過一段時間穩定後,會在 beta 版出現 - stable: 最穩定的版本,但相對的功能較舊 ## 參考資料 - https://www.rust-lang.org/tools/install - https://doc.rust-lang.org/book/ch01-01-installation.html
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up