-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-examplesArea: example targetsArea: example targetsA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bug
Description
In rust-vst
's Cargo.toml, there is the following definition:
[[example]]
name = "simple_host"
crate-type = ["bin"]
among other example declarations which are crate-type = ["cdylib"]
instead.
Trying to run it:
cargo run --example simple_host
error: example target `simple_host` is a library and cannot be executed
However, if you simply remove the line crate-type = ["bin"]
, it starts working.
<&mbrubeck> Walther: I think the bug is here https://github.com/rust-lang/cargo/blob/master/src/cargo/core/manifest.rs#L654-L658
<&mbrubeck> Any non-empty list is treated as ExampleLib, which triggers https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_run.rs#L40-L45
Metadata
Metadata
Assignees
Labels
A-examplesArea: example targetsArea: example targetsA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bug