package graphprint¶
Package graphprint renders a runtime DAG as either a human-readable indented listing or a Graphviz DOT document. Both unobin's stack binaries (via pkg/runner) and the dev CLI (cmd/unobin/root/print-graph) share these renderers so the two paths produce identical output for the same graph.
Functions¶
func DOT¶
DOT writes the DAG to out as a Graphviz directed graph named name. Edges to non-node addresses (like `input.X`) are skipped so the rendered graph contains only nodes the runtime actually executes.
func Text¶
Text writes the DAG to out as an indented listing: one node per stanza, with each outgoing edge prefixed by "->". Addresses are sorted lexicographically so the output is stable across runs.
Types¶
type Binding¶
type Binding struct {
LibraryPath *string `json:"library-path" ub:"library-path"`
Alias string `json:"alias" ub:"alias"`
Export string `json:"export" ub:"export"`
}
type Document¶
type Document struct {
Kind string `json:"kind" ub:"kind"`
FormatVersion int `json:"format-version" ub:"format-version"`
Name string `json:"name" ub:"name"`
Nodes []Node `json:"nodes" ub:"nodes"`
Edges []Edge `json:"edges" ub:"edges"`
Diagnostics []diagnostic.Diagnostic `json:"diagnostics" ub:"diagnostics"`
}