nx_doc_render_mermaid.nx
buildroot/runtime/nx_doc_render_mermaid.nx
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
imports: nx_syscalls.nxnx_string_ops.nx
imported by: nx_doc_render_mermaid_test.nx
structs
| none |
consts
| 22 | const NX_MERMAID_LR: i64 = 0 // left-to-right |
| 23 | const NX_MERMAID_TD: i64 = 1 // top-down |
| 24 | const NX_MERMAID_N: i64 = 2 |
functions
| 26 | func nx_mermaid_dir_is_valid(d: i64) -> i64 called by 1: main |
| 34 | func nx_doc_mermaid_emit_header(dir: i64) calls 1: sys_write |
| 47 | func nx_doc_mermaid_emit_node( calls 1: sys_write |
| 63 | func nx_doc_mermaid_emit_edge( calls 1: sys_write |
| 74 | func nx_doc_mermaid_emit_edge_labeled( calls 1: sys_write |
| 93 | func nx_doc_mermaid_emit_footer(comment: *u8, n_comment: i64) calls 1: sys_write |
| 107 | func nx_doc_mermaid_escape_id( called by 1: main |