Rust 环境搭建 + 第一个Rust程序(使用Win 10 + Visual Studio Code)

本文介绍了如何在Windows 10环境下使用Rustup安装Rust,通过Visual Studio Code配置Rust开发环境,包括设置中文界面、安装rls和Native Debug扩展,并详细阐述了使用cargo创建和运行第一个Rust程序的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

看到基于Windows的比较少,这里是Rust在windows下使用Win 10 + Visual Studio Code配置Rust开发环境

使用 Rustup安装Rust

Rust 由工具 rustup 安装和管理。
所以这里下载安装器
在这里插入图片描述
点击安装器,会出现如下的命令行界面
在这里插入图片描述

Rust Visual C++ prerequisites

Rust requires the Microsoft C++ build tools for Visual Studio 2013 or
later, but they don't seem to be installed.

The easiest way to acquire the build tools is by installing Microsoft
Visual C++ Build Tools 2019 which provides just the Visual C++ build
tools:

  https://visualstudio.microsoft.com/visual-cpp-build-tools/

Please ensure the Windows 10 SDK and the English language pack components
are included when installing the Visual C++ Build Tools.

Alternately, you can install Visual Studio 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值