I'm following the instructions in the book "The Rust Programming Language" to build a guessing game, but whenever I try to run my code (via the command Cargo run
) in the VSCodium (Open source version of VSCode) terminal, my code refuses to run due to the following error:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
here's what my Cargo.toml file looks like:
[package]
name = "GuessingGame"
path = "src/GuessingGame.rs"
version = "0.1.0"
edition = "2021"
authors = ["my name <example@example.com>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
VERSIONS: VSCodium: 1.73.1 OS: Zorin OS 16.2
i tried changing [package]
to [[bin]]
and [lib]
, but it gave me more errors, being:
this virtual manifest specifies a [lib] section, which is not allowed
and
this virtual manifest specifies a [[bin]] section, which is not allowed