UCE Docs / unit_info

Signature

DValue unit_info(String path = "")

Parameters

path : optional UCE unit path. If empty, uses the current executing unit.
return value : metadata tree for the resolved unit, or an empty tree if the unit cannot be resolved

Returns runtime metadata for a UCE compilation unit.

The returned tree is supplied by the host runtime and may include normalized source/artifact paths, compile/runtime status, ABI/wasm availability, timing counters, mtimes, and exported API declarations. Treat absent fields as unavailable rather than as false.

If path is relative, it is resolved by the same host unit resolver used for unit calls/components.

Because unit metadata lives in worker process memory, request and timing counters reflect the current runtime process, not an aggregate across every worker process.

Example

DValue info = unit_info("examples/sample_unit.uce");
print("unit_info() returns ", info.get_type_name(), " metadata for the unit\n");
Output
unit_info() returns array metadata for the unit