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

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
主站蜘蛛池模板: 富阳市| 梁平县| 天祝| 临邑县| 元朗区| 明星| 息烽县| 伊宁县| 临安市| 寿宁县| 陆良县| 新昌县| 济阳县| 浠水县| 霸州市| 西乌| 平利县| 贵德县| 黎川县| 宿迁市| 霍州市| 安塞县| 修武县| 渑池县| 上杭县| 阳春市| 陆川县| 利川市| 米脂县| 清水河县| 江津市| 邳州市| 建瓯市| 酉阳| 平安县| 常宁市| 宕昌县| 呼和浩特市| 老河口市| 荔浦县| 天镇县|