I'm trying to build a Rust project (xray). When running cargo run I get the following error message
error: manifest path
D:\xray\building\xray\Cargo.tomlis a virtual manifest, but this command requires running against an actual package in this workspace
What exactly does this mean and how can it be solved? I'm using Cargo version 0.25.0 and Rust version 1.24.1.
Your Cargo.toml is a virtual manifest.
In workspace manifests, if the
packagetable is present, the workspace root crate will be treated as a normal package, as well as a workspace. If thepackagetable 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--alloption, will execute the command for all the non-virtual manifest in the workspace.
cargo run does not work, because cargo doesn't know what to run. There are two options:
--manifest-path <PATH>: Path to Cargo.toml of the crate you want to run.-p, --package <SPEC>: Package you want to run.In your case it's probably cargo run --package xray_cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With