Expand description
Build-event renderers shared by the hm CLI and the cloud plugin.
This crate owns the output layer: the OutputRenderer trait, the
OutputMode selection enum, and the concrete renderers
(HumanRenderer, ProgressRenderer, JsonRenderer). All of
them consume hm_plugin_protocol::BuildEvents; nothing here depends
on hm internals (no RunContext, no Docker types).
Re-exports§
pub use human::HumanRenderer;pub use json::JsonRenderer;pub use progress::ProgressRenderer;
Modules§
- human
- Human-readable
OutputRenderer— replaces the formerhm-plugin-output-humanWASM plugin with a plain struct that writes formatted lines to anystd::io::Writetarget. - json
- JSON-lines
OutputRenderer— replaces the formerhm-plugin-output-jsonWASM plugin. Serialises eachBuildEventas a single JSON line. - progress
- Progress-bar
OutputRenderer— bridgesBuildEvents intotracingspans thattracing-indicatifrenders as live progress bars. - spinner
Enums§
- Output
Mode - How to render output. Determined at startup from CLI flags and TTY detection.
Traits§
- Output
Renderer - Synchronous observer of
BuildEvents.
Functions§
- color_
enabled - Whether ANSI color should be used: honors an explicit no-color flag,
the
NO_COLORenv convention, and whether stderr is a TTY. - drive
- Drive a renderer from an mpsc stream of events.
- drive_
stream - Drive a renderer from a
Streamof events until it ends or aBuildEndis seen. - renderer_
for - Build the renderer for a run.
- stderr_
interactive - Whether stderr is an interactive terminal (drives the progress view).
- stdout_
piped - Whether stdout is NOT a TTY (i.e. piped) — used to force the streaming log view.