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

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
主站蜘蛛池模板: 海兴县| 泰顺县| 闽清县| 九江市| 慈溪市| 垣曲县| 大宁县| 玛纳斯县| 顺义区| 湟源县| 辰溪县| 松阳县| 丰原市| 长岛县| 宝坻区| 开江县| 永泰县| 安宁市| 泊头市| 随州市| 中卫市| 芦溪县| 连平县| 晋州市| 泉州市| 东安县| 潼南县| 巨鹿县| 内丘县| 福州市| 九江县| 安庆市| 讷河市| 突泉县| 河津市| 赞皇县| 衡水市| 蓝田县| 玛曲县| 上思县| 永修县|