Skip to content

Provide Cargo messages as JSON messages #8283

Open

Description

Describe the problem you are trying to solve
When integrating Cargo with an editor or IDE, it is common to use JSON to get structured messages from rustc. However, Cargo's own messages (such as errors, warnings, etc.) are sent as plain text, making it difficult for the development environment to know how to display these messages.

Describe the solution you'd like
It would be nice if Cargo's messages were sent as JSON when --message-format=json is used.

Notes
There are many decisions to be made on the behavior and exact structure to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.A-json-outputArea: JSON message outputC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions