项目文件下Cargo.toml文件原配置如下
[package]
name = "greeting"
version = "0.1.0"
authors = ["xingpeiyi@yeah.net <xingpeiyi@yeah.net>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
VSCode 运行时提醒如下
解决方法是在Cargo.toml中添加bin节点 (programname改为你的项目名字)后完美运行
[[bin]]
name = "programname"
path = "src/programname.rs"
原问题和解决方法地址为:
https://stackoverflow.com/questions/37491436/failed-to-parse-manifest-no-targets-specified