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

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
主站蜘蛛池模板: 达州市| 武功县| 临颍县| 辉县市| 南皮县| 法库县| 滨州市| 大新县| 曲周县| 天长市| 鹿邑县| 井研县| 周至县| 白银市| 阿城市| 晋江市| 深水埗区| 肃宁县| 苍梧县| 民和| 黄石市| 泾源县| 苍南县| 河池市| 蒙阴县| 八宿县| 偏关县| 万载县| 彝良县| 望谟县| 拉萨市| 华坪县| 乐山市| 原阳县| 蓬溪县| 临桂县| 廉江市| 临夏市| 眉山市| 道真| 桐梓县|