The target is a binary and can't have any crate-types set (currently "cdylib, rlib")

I am creating a staking exchange for staking and unstaking coins from chains like Polkadot.
I am trying to build the contract and I get this error error: failed to parse manifest at /tmp/cargo-contract_LllVxq/Cargo.toml

Caused by:
the target staking_exchange is a binary and can't have any crate-types set (currently "cdylib, rlib")
ERROR:
I understand that the contract should be considered as library and not as a binary so I would like to know why this is happening . I don't have main.rs or src . My lib.rs is in the root directory and so is my Cargo.toml . This is my Cargo.toml :
[package]
name = "staking_exchange"
version = "0.1.0"
authors = ["*********** <******************>"]
edition = "2021"

[dependencies]
ink = { version = "5.0.0", default-features = false }
ink_storage = { version = "5.0.0", default-features = false }
parity-scale-codec = { version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true }

[dev-dependencies]
ink_e2e = { version = "5.0.0" }

[lib]
crate-type = ["cdylib", "rlib"]
path = "lib.rs"

[features]
default = ["std"]
std = [
"ink/std",
"ink_storage/std",
"parity-scale-codec/std",
"scale-info/std"
]
ink-as-dependency =
e2e-tests =

Could you please remove this part of your manifest and try again?

Also, when posting code here on URLO, please wrap code snippets (including toml) in three backticks (```) like this:

```
your code here
```

For more info on how highlighting works, please refer to this topic.

Your better off asking the question on ink specific help channels.

Hi thank you I will follow the format . I changed my Cargo.toml to this [lib] path = "lib.rs"
and then I got this error
error[E0601]: main function not found in crate staking_exchange
--> /home/babylontest/staking_exchange/lib.rs:515:2
|
515 | }
| ^ consider adding a main function to /home/babylontest/staking_exchange/lib.rs

ok will check that

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.