Closed
Description
As of /pull/3556, the cargo metadata
command does not output the "kind" as "example" if the example specifies a crate-type. Sample Cargo.toml:
[package]
name = "scratch"
version = "0.0.0"
[[example]]
name = "elib1"
path = "examples/elib1.rs"
crate-type=["staticlib"]
I am working on a tool that uses the metadata output to determine which command-line arguments to pass to Cargo in order to build a target. Without knowing this is an example, it is impossible to know to pass --example.
I am unsure of what the correct solution is. Some ideas:
- "kind" can display "example" even if it is an ExampleLib.
- Include an "is_example" field.
- Include an "args" field that indicates how to build this target.
Metadata
Metadata
Assignees
Labels
No labels