gleamunison/cli_output

Structured output for run --json. One line, parseable by any client:

{“ref”: “”, “value”: } {“ref”: “”, “module”: “m_ab12cd34”, “function”: {“name”: “$eval”, “arity”: 2}}

The envelope is the CLI’s contract; term_to_json owns how a value becomes JSON (native where the shape is unambiguous, tagged for constructors, opaque where JSON has no honest representation).

Values

pub fn function_json(
  ref_hex: String,
  module: String,
  arity: Int,
  exports: List(#(String, Int)),
) -> String

A function, reported without executing it: the module, its compiled entry point, and the declared arity a caller must supply.

pub fn value_json(
  ref_hex: String,
  term: dynamic.Dynamic,
) -> String

A value definition’s result.

✨ Search Document