Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

安裝

安裝 Rust 和 Cargo

取得 Cargo 最簡單的方式是使用 rustup 安裝目前的 Rust 穩定發行版。使用 rustup 安裝 Rust 也會同時安裝 cargo

在 Linux 和 macOS 系統上,操作方式如下:

curl https://sh.rustup.rs -sSf | sh

它將會下載一個腳本並開始安裝。如果一切順利,您將會看到以下內容:

Rust is installed now. Great!

On Windows, download and run rustup-init.exe. It will start the installation in a console and present the above message on success.

在此之後,您可以使用 rustup 命令來安裝 Rust 與 Cargo 的 betanightly 頻道。

關於其他安裝選項與資訊,請訪問 Rust 網站的安裝頁面。

從來源碼建置並安裝 Cargo

或者,您可以從來源碼建置 Cargo