官术网_书友最值得收藏!

Managing the Rust installation with rustup.rs

To test whether the installation of the Rust toolchain with rustup was successful, the rustc command is available to run in Terminal (or PowerShell on Windows):

$ rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)

Note that you will have a later version when you are running this. It doesn't matter if you stick to the 2018 edition for your code.

Rust requires a native linker to be available on your system. On Linux or Unix systems (such as macOS), Rust calls  cc  for linking, whereas on Windows, the linker of choice is Microsoft Visual Studio's linker, which depends on having Microsoft Visual C++ Build Tools installed. While it's possible to use an open source toolchain on Windows as well, this exercise is left for more advanced users.

Even with the 2018 edition, some useful features are still only available on nightly. To install the nightly edition of rustc, perform these steps:

  1. Run rustup install nightly (use nightly-msvc on Windows if you are not using the GNU toolchain) in a Terminal or PowerShell window.
  2. After the command finishes, the default toolchain (used in cargo) can be switched using rustup default nightly.

主站蜘蛛池模板: 龙山县| 治多县| 澄江县| 临城县| 通榆县| 锡林浩特市| 普定县| 安龙县| 江山市| 滦平县| 香港 | 阿坝县| 额尔古纳市| 通河县| 阆中市| 嘉善县| 扎囊县| 仪征市| 宁德市| 三穗县| 堆龙德庆县| 阳原县| 宁阳县| 平原县| 新兴县| 达日县| 如东县| 额敏县| 务川| 黔西县| 洛扎县| 嫩江县| 清河县| 余庆县| 天台县| 巴青县| 广平县| 夏津县| 麻阳| 阿拉善右旗| 大关县|