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

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
主站蜘蛛池模板: 沙湾县| 凉城县| 东光县| 慈溪市| 莱芜市| 万安县| 桂东县| 军事| 奈曼旗| 河北区| 汉中市| 江达县| 随州市| 唐山市| 南投县| 信阳市| 南皮县| 昂仁县| 宁波市| 仪陇县| 沂南县| 九龙城区| 申扎县| 庐江县| 东莞市| 类乌齐县| 喀喇沁旗| 宜昌市| 玉门市| 神池县| 仁怀市| 尖扎县| 西盟| 宜兰市| 天祝| 板桥市| 保德县| 常德市| 舞阳县| 佛山市| 石楼县|