code wiki / (root) / nx_doc_render_mermaid.nx

nx_doc_render_mermaid.nx

buildroot/runtime/nx_doc_render_mermaid.nx

3882 B135 linesdepth 6pulls 6 transitivereach 1 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_render_mermaid.nx -- D10 first stone of V4 docs doctrine. Emits Mermaid 'graph LR' or 'graph TD' syntax representing substrate's doc-link graph. Caller provides node + edge data; this primitive writes Mermaid-formatted text to fd 1. Bits-up: no mermaid.js dependency. Substrate-owned emitter per the V4 living-docs cardinal + [[feedback-bits-up-shell-replace- linux-brother-tools]] applied to doc rendering. **Quadrant:** REFERENCE (Diátaxis) **Topic Type:** REFERENCE (DITA) **Status:** DRAFT (D10 first stone) **Trust State:** WRITTEN_UNTESTED **Competitive State:** UNCLASSIFIED

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_string_ops.nx nx_doc_render_mermaid.nx nx_doc_render_mermaid_test.nx

imports: nx_syscalls.nxnx_string_ops.nx

imported by: nx_doc_render_mermaid_test.nx

structs

none

consts

22const NX_MERMAID_LR: i64 = 0 // left-to-right
23const NX_MERMAID_TD: i64 = 1 // top-down
24const NX_MERMAID_N: i64 = 2

functions

26func nx_mermaid_dir_is_valid(d: i64) -> i64
called by 1: main
34func nx_doc_mermaid_emit_header(dir: i64)
calls 1: sys_write
47func nx_doc_mermaid_emit_node(
calls 1: sys_write
63func nx_doc_mermaid_emit_edge(
calls 1: sys_write
74func nx_doc_mermaid_emit_edge_labeled(
calls 1: sys_write
107func nx_doc_mermaid_escape_id(
called by 1: main