Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
compile_report.h File Reference

Compile report emission controls. More...

Go to the source code of this file.

Data Structures

struct  loomc_compile_report_options_t
 Compile report emission options. More...

Macros

#define LOOMC_ARTIFACT_FORMAT_COMPILE_REPORT_JSON   "loom-compile-report-json"
 Loom compile report JSON artifact format.

Enumerations

enum  loomc_compile_report_mode_t { LOOMC_COMPILE_REPORT_MODE_NONE = 0 , LOOMC_COMPILE_REPORT_MODE_SUMMARY = 1 , LOOMC_COMPILE_REPORT_MODE_DETAILS = 2 }
 Compile report detail mode. More...

Functions

loomc_status_t loomc_compile_report_mode_parse (loomc_string_view_t value, loomc_compile_report_mode_t *out_mode)
 Parses a stable compile report mode spelling.
loomc_string_view_t loomc_compile_report_mode_name (loomc_compile_report_mode_t mode)
 Returns the stable JSON/CLI spelling for mode.

Detailed Description

Compile report emission controls.

Compile reports are optional machine-readable sidecars for target emission. They describe the selected backend, target, terminal status, artifact size, and target-provided compiler analysis facts available at the selected verbosity. Summary and detail reports include configuration bindings applied by the module's last successful compilation. These bindings survive release of the configuration module and compile result, workspace trimming, and module cloning. IR serialization alone does not carry invocation bindings.

Report generation is opt-in. Omitting this descriptor, or setting mode to LOOMC_COMPILE_REPORT_MODE_NONE, keeps emission on the normal artifact path and avoids detail-only report collection.

Enumeration Type Documentation

◆ loomc_compile_report_mode_t

Compile report detail mode.

Enumerator
LOOMC_COMPILE_REPORT_MODE_NONE 

Does not request a compile report.

LOOMC_COMPILE_REPORT_MODE_SUMMARY 

Requests stable target, status, artifact, and summary compiler facts.

LOOMC_COMPILE_REPORT_MODE_DETAILS 

Requests summary facts plus detail rows when producers support them.

Function Documentation

◆ loomc_compile_report_mode_name()

loomc_string_view_t loomc_compile_report_mode_name ( loomc_compile_report_mode_t mode)

Returns the stable JSON/CLI spelling for mode.

Parameters
modeMode to name. Unrecognized values use the "none" spelling.
Returns
Borrowed static string view containing the stable spelling.

◆ loomc_compile_report_mode_parse()

loomc_status_t loomc_compile_report_mode_parse ( loomc_string_view_t value,
loomc_compile_report_mode_t * out_mode )

Parses a stable compile report mode spelling.

Accepts "", "none", "summary", "details", "json", "json-summary", or "json-details".

Parameters
valueMode spelling to parse. The view need not be NUL-terminated.
out_modeReceives the parsed mode on success.
Returns
OK when value is recognized. Invalid argument is returned when out_mode is NULL or the spelling is unsupported.