Reputation: 255
I'm running this in powershell for my Rust project:
cargo build --target thumbv7em-none-eabihf
And it produces this error after I try to execute this command:
error: failed to parse manifest at C:\Users\PC\Downloads\Blizzard\Cargo.toml Caused by: virtual manifests must be configured with [workspace]
Here is my Cargo.toml file:
[package]
name = "my-project"
version = "0.1.0"
authors = ["runner"]
edition = "2021"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
If it's needed, here is my rust file:
#![no_std]
#![no_main]
use core::panic::PanicInfo;
#[no_mangle]
pub extern "C" fn _start() -> ! {
loop {}
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
And my file path looks like this:
> Blizzard
> src
> main.rs
> Cargo.toml
How can I fix this issue? Any help is appreciated
Upvotes: 7
Views: 5416
Reputation: 1
Add following in your cargo.toml
[workspace]
members = ["NameOfYourPackage"]
Upvotes: 0