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

  • Rust Programming Cookbook
  • Claus Matzinger
  • 215字
  • 2021-06-24 12:27:40

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
主站蜘蛛池模板: 巴彦淖尔市| 广汉市| 五峰| 寿光市| 福州市| 手游| 鸡西市| 丹东市| 策勒县| 祥云县| 朝阳市| 长岛县| 宣汉县| 威远县| 菏泽市| 咸丰县| 古丈县| 北宁市| 张家界市| 承德市| 波密县| 佛山市| 集贤县| 龙海市| 囊谦县| 万年县| 孝义市| 蓝田县| 抚宁县| 洞头县| 新密市| 山东省| 东乡| 包头市| 牙克石市| 开封县| 台中县| 垦利县| 临泉县| 泰顺县| 定陶县|