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

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.

主站蜘蛛池模板: 海兴县| 枝江市| 蕲春县| 丰顺县| 容城县| 庆元县| 潼关县| 中宁县| 门源| 阳西县| 蕉岭县| 江永县| 墨竹工卡县| 泌阳县| 洛扎县| 孝感市| 遂昌县| 辽宁省| 永年县| 尖扎县| 化州市| 射阳县| 武威市| 孟津县| 开平市| 德惠市| 普安县| 璧山县| 垦利县| 奈曼旗| 饶平县| 延长县| 娄烦县| 出国| 曲阜市| 化隆| 乌兰浩特市| 晋宁县| 辽阳市| 星座| 宜宾县|