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

Setting up your environment

Since the programming language comes with a variety of toolchains, tools, linkers, and compiler versions, choosing the best-fitting variation is not easy. Additionally, Rust works on all major operating systems—which adds another variable. 

However, installing Rust has become a trivial task when using rustup (https://rustup.rs/). On the website, a helpful script (or installer on Windows) that takes care of retrieving and installing the required components can be downloaded. The same tool lets you switch between and update (and uninstall) these components as well. This is the recommended way.

Choosing to use the Microsoft Visual Studio Compiler ( MSVC) together with Rust requires that you install additional software such as the Visual C++ runtime and compiler tools. 

To write code, an editor is also required. Since Visual Studio Code sports some Rust parts, it is a great choice together with the Rust extension. It's an open source editor developed by Microsoft and is well received across the world and the Rust community. In this recipe, we will install the following components:

  • Visual Studio Code (https://code.visualstudio.com/)
  • rustup (https://rustup.rs)
  • rustc (and the rest of the compiler toolchains)
  • cargo
  • RLS (short for Rust Language Server—this is for autocompletion)
  • Rust language support for Visual Studio Code
主站蜘蛛池模板: 承德县| 横山县| 商丘市| 龙陵县| 三明市| 大洼县| 东乡县| 邵东县| 夹江县| 房产| 铁岭县| 平原县| 闽清县| 方正县| 肃宁县| 泾源县| 龙岩市| 呼和浩特市| 大田县| 远安县| 贵溪市| 永修县| 康马县| 盘山县| 临沂市| 恭城| 山阳县| 宣恩县| 盐山县| 定南县| 筠连县| 承德市| 长沙县| 涿州市| 右玉县| 泰安市| 莎车县| 曲沃县| 略阳县| 凌海市| 花垣县|