"manifest path is a virtual manifest, but this command requires running against an actual package" 是什么意思?
What does "manifest path is a virtual manifest, but this command requires running against an actual package" mean?
我正在尝试构建一个 Rust 项目 (xray)。当 运行 cargo run
我收到以下错误消息
error: manifest path D:\xray\building\xray\Cargo.toml
is a virtual
manifest, but this command requires running against an actual package
in this workspace
这到底是什么意思,如何解决?我正在使用 Cargo 版本 0.25.0 和 Rust 版本 1.24.1.
清单中包含包和工作区部分无法正常工作。请检查 Cargo.toml 并从中删除包。
Virtual Manifest是新概念,请阅读文档熟悉它。希望它对你有价值。
你的 Cargo.toml
是 virtual manifest.
In workspace manifests, if the package
table is present, the workspace root crate will be treated as a normal package, as well as a workspace. If the package
table is not present in a workspace manifest, it is called a virtual manifest.
When working with virtual manifests, package-related cargo commands, like cargo build
, won't be available anymore. But, most of such commands support the --all
option, will execute the command for all the non-virtual manifest in the workspace.
cargo run
不起作用,因为 cargo 不知道 什么 到 运行。有两种选择:
--manifest-path <PATH>
:您想要 运行. 的箱子 Cargo.toml
的路径
-p, --package <SPEC>
: 你想要的包 运行.
你的情况可能是 cargo run --package xray_cli
我正在尝试构建一个 Rust 项目 (xray)。当 运行 cargo run
我收到以下错误消息
error: manifest path
D:\xray\building\xray\Cargo.toml
is a virtual manifest, but this command requires running against an actual package in this workspace
这到底是什么意思,如何解决?我正在使用 Cargo 版本 0.25.0 和 Rust 版本 1.24.1.
清单中包含包和工作区部分无法正常工作。请检查 Cargo.toml 并从中删除包。
Virtual Manifest是新概念,请阅读文档熟悉它。希望它对你有价值。
你的 Cargo.toml
是 virtual manifest.
In workspace manifests, if the
package
table is present, the workspace root crate will be treated as a normal package, as well as a workspace. If thepackage
table is not present in a workspace manifest, it is called a virtual manifest.When working with virtual manifests, package-related cargo commands, like
cargo build
, won't be available anymore. But, most of such commands support the--all
option, will execute the command for all the non-virtual manifest in the workspace.
cargo run
不起作用,因为 cargo 不知道 什么 到 运行。有两种选择:
--manifest-path <PATH>
:您想要 运行. 的箱子 -p, --package <SPEC>
: 你想要的包 运行.
Cargo.toml
的路径
你的情况可能是 cargo run --package xray_cli