Skip to main content

Module cargo

Module cargo 

Source
Expand description

cargo --message-format=json diagnostics (PSP-10 system 26).

Preserves codes, primary spans, children, and applicable suggestions from the compiler’s native JSON stream. Non-JSON lines are ignored, so mixed streams (human progress on stderr, JSON on stdout) parse cleanly.

Constants§

PARSER_ID
Parser identity; enters the sensor fingerprint.

Functions§

looks_like_stream
Whether a captured output looks like a cargo JSON stream.
parse
Parse every compiler-message with level error from the stream.