Skip to content

It would be useful for Crates.io API to surface is_proc_macro #11852

@dzbarsky

Description

@dzbarsky

Current Behavior

It doesn't look possible to tell from the API whether a crate's lib is a proc macro. Tools using the API are unable to tell if a crate is a proc macro without downloading it and examining the Cargo.toml.

Expected Behavior

The API already surfaces some fields describing what's in the crate, such as bin_names and has_lib. It would be useful to also surface is_proc_macro: [true/false] depending on whether "proc-macro = true" is set in the Cargo.toml.

Steps To Reproduce

  1. Go to https://crates.io/api/v1/crates/serde_derive/1.0.204
  2. No indication that this is a proc macro

Environment

  • Browser:
  • OS:

Anything else?

No response

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