首页 > 解决方案 > 创建货物后,我在运行此货物时遇到了一些问题

问题描述

我在 VS 代码终端中使用命令(Cargo run)运行 Cargo 时遇到了这个问题。我的电脑是 32 位的。

我还尝试使用此命令分别运行和编译 main.rs 文件,但编译时出现相同的错误。

error: process didn't exit successfully: `rustc -vV` (exit code: 1) --- stderr
error: 'rustc.exe' is not installed for the toolchain 'stable-i686-pc-windows-msvc'
To install, run `rustup component add rustc --toolchain stable-i686-pc-windows-msvc`

我只需要编译并运行这个文件并得到想要的输出。

标签: rustrust-cargo

解决方案


正如错误提示的那样,您必须安装 32 位版本的 Rust(您可能已经拥有推荐的 64 位版本)。在终端 (cmd.exe) 中,运行:

rustup target add i686-pc-windows-msvc

推荐阅读