当前位置首页端游《为 Windows 10和VS Code安装 Rust》

《为 Windows 10和VS Code安装 Rust》

类型:喜剧 恐怖 枪战 英国 2012 

主演:帕特丽夏·阿奎特 韦鲁切·欧皮亚 Jayden Gomez 克里斯蒂娜 

导演:杨毅坤 

剧情简介

为 Windows 10和VS Code安装 Rust

更多互联网精彩资讯、工作效率提升关注【飞鱼在浪屿】(日更(📤)新)

从全新的 Rust 安装到 Windows 10 上。

首先,安装 rustup。只需访问 rustup 网站即可找到它(🤗)。https://win.rustup.rs/x86_64,下载rust-init.exe安装程序。使用 rustup,至少安装一个 Rust 工具链。可以在(🎡)nightly或stable版本之间进行选(💏)择,也可以针对 Windows 或 GNU libc 进行构建。
$ rustup install nightly-msvc

或者如果更精确,像这样:

$ rustup install nightly-x86_64-pc-windows-msvc

特定目标和工具链可能因你的机器而异。

然(🌎)后你设置默认工具链(💠)
$ rustup default nightly-msvc

可以同时使用gnumsvc版本并使用 rustup 切换它(❌)们。

自动更新 rustup 工具链

$ rustup self update$ rustup update nightly //or stable
安装开发工具

有很多工具可以让 Rust 的开发变得更容易,你可以用 cargo 安(🌇)装它们:

Racer:“为编辑器和 IDE提供Rust 代码补全的实用程序”
$ cargo install racer
rustsym:“一种Rust代码中查询符(👾)号以用于 IDE 的工具”
$ cargo install rustsym
rustfmt:“根据样式指南格式化 Rust 代码的工具”
$ cargo install rustfmt
ripgrep:“ripgrep 结合了 Silver Searcher 的能力(💊)和 grep 的原(🎽)始速度”
$ cargo install ripgrep
还可以安装rust文档
$ rustup component add rust-doc
最后但并非最不重要的一点是,Visual Studio Code 插(🥙)件所需的大部分功(🍧)能都由Rust Language Server 提供,所以(👏)继续安装它:
$ rustup self update$ rustup update nightly$ rustup component add rls --toolchain nightly$ rustup component add rust-analysis --toolchain nightly$ rustup component add rust-src --toolchain nightly

现在我们已准备好继续安装和设置 Visual Studio Code。

VSCode 设置

假设还没(🤔)有(🎏)安装VSCode,以下是安(🤴)装(🧥)它的步骤:

从https://code.visualstudio.com/获取安装程序并运行它。为 VSCode 安装最新的 Rust 扩展,即vscode-rust。还会看(📃)到 RustyCode 和 vsc-rustfmt 存在,但vscode-rust取代了它们。您可以通过使用命令Ctrl+P并键入来安装它ext install vscode-rust,或者通过在扩展选项卡(🚒)上搜索它来安装它,其按钮是左侧工(🧘)具栏上的最后一个。可能(🏐)需要重新加载才生效。使用 VSCode 设置服务(🔷)器。设置File -> Preferences -> Settings。它们的工作方式是使用左(➗)窗格覆盖右窗格中显示的任何默认设置。
这是需要添加的内容:
"rust.rustLangSrcPath": "<path of your rust src>","rust.rls": {    "executable": "rustup",    "args": [        "run",        "nightly",        "rls"    ],    "env": {        "RUST_LOG": "rls=debug"    }},

你(🍻)的(👊) rust src 应该像C:\Users\<username>\.rust\rust\src.

如果您已经安装,rustfmt您可能还需要添加:
"editor.formatOnSave": true,"rustfmt.bin": "C:/Users/<username>/.cargo/bin/rustfmt.exe"

或者rustfmt可执行文件的位置。

现在应该能够在 VSCode 中编译、运行、获取自动完成和错误列表等(🌻)。

可以使用附带的(🧓)PowerShell的运行cargo,或者可以使用插件的cargo:Ctrl+ Shift+P和类型(🎽)cargo,以获取列表。

调试设置首先,添加(😐)到设置:
"debug.allowBreakpointsEverywhere": true,
然后搜索ms-vscode.cpptools扩展并安装(🤪)它。它显示的名(🎥)称是“C/C++”。您应该将 rustup 工具链设置为msvc.需要添加一个调试配置(🍩),Debug -> Add Configuration...它应该(🚈)为您提供一个包含“C++ (Windows)”的(🦌)选择。选择它,应该会创建一个新launch.json文件,您需要为您的项目自定(🚍)义该文件,最终应如下所示:
{    "version": "0.2.0",    "configurations": [                {            "name": "(Windows) Launch",            "type": "cppvsdbg",            "request": "launch",            "program": "${workspaceRoot}/target/debug/<yourprojectname>.exe",            "args": [],            "stopAtEntry": false,            "cwd": "${workspaceRoot}",            "environment": [],            "externalConsole": true        }    ]}
现在应该可以设置(😥)断点,然后执行Debug -> Start Debugging或点击F5彩蛋:更改编辑器主题/字体

VSCode 还提供了大量可选主题列表,请(📃)执行File -> Preferences -> Color Theme-> Install Additional Color Themes.... 这里使用(🔝)的是Harmonic16 Light 主题

使用Anonymous Pro作为所有代(🐧)码编辑的字体。可以设置它并更改大小,方法是在设置中添加这(💮)些行:

"editor.fontFamily": "<your font>, Consolas, 'Courier New', monospace","editor.fontSize": 16,

【nba2k22手游怎么下载安卓的相关新闻】

猜你喜欢

  • 更新至06集

    喧哗独学

  • 更新至20240502期小屋特辑

    音你而来

  • 更新至第20240503期

    半熟恋人第三季

  • 更新至18集

    天行健

  • HD

    前途海量

  • 更新至08集

    老家伙

  • 更新至17集

    另一种蓝

  • 更新至05集

    庆余年第二季

  • 更新至02集

    9号秘事第九季

  • 更新至04集

    布里奇顿第三季

💟为 Windows 10和VS Code安装 Rust相关问题

1.请问哪个网站可以免费在线观看动漫《为 Windows 10和VS Code安装 Rust》?

优酷视频网友:

2.《为 Windows 10和VS Code安装 Rust》是什么时候上映/什么时候开播的?

腾讯视频网友:上映时间为2022年,详细日期可以去百度百科查一查。

3.《为 Windows 10和VS Code安装 Rust》是哪些演员主演的?

爱奇艺网友:为 Windows 10和VS Code安装 Rust演员表有,导演是。

4.动漫《为 Windows 10和VS Code安装 Rust》一共多少集?

电影吧网友:目前已更新到全集已完结

5.手机免费在线点播《为 Windows 10和VS Code安装 Rust》有哪些网站?

手机电影网网友:美剧网、腾讯视频、电影网

6.《为 Windows 10和VS Code安装 Rust》评价怎么样?

百度最佳答案:《为 Windows 10和VS Code安装 Rust》口碑不错,演员阵容强大演技炸裂,并且演员的演技一直在线,全程无尿点。你也可以登录百度问答获得更多评价。

  • 为 Windows 10和VS Code安装 Rust百度百科 为 Windows 10和VS Code安装 Rust版原著 为 Windows 10和VS Code安装 Rust什么时候播 为 Windows 10和VS Code安装 Rust在线免费观看 为 Windows 10和VS Code安装 Rust演员表 为 Windows 10和VS Code安装 Rust大结局 为 Windows 10和VS Code安装 Rust说的是什么 为 Windows 10和VS Code安装 Rust图片 在线为 Windows 10和VS Code安装 Rust好看吗 为 Windows 10和VS Code安装 Rust剧情介绍      为 Windows 10和VS Code安装 Rust角色介绍 为 Windows 10和VS Code安装 Rust上映时间 
  • Copyright © 2008-2018

    统计代码