红穆笔记

rustup component

修改已安裝工具鏈的組件。 如果不使用 `--toolchain` 選項,`rustup` 將使用默認工具鏈。有關工具鏈的更多信息請參見 `rustup help toolchain`

100% 瀏覽器本地處理 0 數據上傳

常用示例

向工具鏈添加組件

rustup component add --toolchain {{工具鏈}} {{組件}}

從工具鏈中移除組件

rustup component remove --toolchain {{工具鏈}} {{組件}}

列出工具鏈已安裝和可用的組件

rustup component list --toolchain {{工具鏈}}

列出工具鏈已安裝的組件

rustup component list --toolchain {{工具鏈}} --installed

提示:花括號{{…}}是需要替換的參數(路徑、文件名等);命令只在本機終端執行,本站不保存任何輸入。

英文原文對照

展開英文說明與示例(來源 tldr-pages)

Modify a toolchain's installed components. Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains. More information

Add a component to a toolchain

rustup component add --toolchain {{toolchain}} {{component}}

Remove a component from a toolchain

rustup component remove --toolchain {{toolchain}} {{component}}

List installed and available components for a toolchain

rustup component list --toolchain {{toolchain}}

List installed components for a toolchain

rustup component list --toolchain {{toolchain}} --installed

命令信息

命令名rustup component
用途修改已安裝工具鏈的組件。 如果不使用 `--toolchain` 選項,`rustup` 將使用默認工具鏈。有關工具鏈的更多信息請參見 `rustup help toolchain`
適用平臺通用
示例數量4 條
官方文檔https://rust-lang.github.io/rustup/
數據來源tldr-pages(CC-BY-4.0)· 社區中文翻譯

常見問題

rustup component 命令是做什麼的?

修改已安裝工具鏈的組件。 如果不使用 `--toolchain` 選項,`rustup` 將使用默認工具鏈。有關工具鏈的更多信息請參見 `rustup help toolchain`

rustup component 怎麼用?

頁面按場景列出了4 條常用示例:每條示例先說明用途,再給出可直接複製的完整命令(花括號裏是需要替換的參數)。

rustup component 最常用的操作是什麼?

向工具鏈添加組件:rustup component add --toolchain {{工具鏈}} {{組件}}

命令裏的花括號是什麼意思?

花括號{{…}}表示需要替換成你自己的值,例如路徑、文件名;同名參數方括號(如 [-C|--directory])表示可選寫法。