Skip to content

Crate type of examples is not included in read-manifest output #3572

Closed
@jethrogb

Description

@jethrogb

I have this crate:

[lib]
crate-type = ["staticlib"]

[[example]]
name = "l"
crate-type = ["staticlib"]

This succesfully builds my example into a static library.

However, I this information is not exposed through cargo read-manifest:

$ cargo read-manifest|json_pp
{
   "dependencies" : [],
   "targets" : [
      {
         "name" : "cttest",
         "src_path" : "src/lib.rs",
         "kind" : [
            "staticlib"
         ]
      },
      {
         "kind" : [
            "example"
         ],
         "src_path" : "examples/l.rs",
         "name" : "l"
      }
   ],
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions