code wiki / hub / nx_doc_extractor_nx.nx

nx_doc_extractor_nx.nx

buildroot/runtime/hub/nx_doc_extractor_nx.nx

10152 B255 linesdepth 3pulls 3 transitivereach 4 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_extractor_nx.nx -- V2.0 P-6: deep .nx artifact parser. Reads .nx body bytes; extracts import_count + export_count for populating NxArtifactStore.import_count + export_count fields. Composes existing primitives. COMPOSES: nx_html_extract.nx_he_match_ci (case-sensitive byte prefix match) (caller passes body bytes already loaded via sys_read_file) COMPOSED BY: wiki/nx_pipeline_walker (V3+ swap; V2.0 uses hardcoded zero values) V2.0 P-6 SCOPE: - Count "import " line-starts -> import_count - Count "func " line-starts (non-comment) -> export_count - Skip lines inside `// ...` comment blocks (single-line) - Bounded by body byte count - Pure-function; no allocation; no state V3+ SCOPE (TODO): - Parse sealed verdict const ranges (NX_XXX_OK = 0) - Parse struct decls (struct NxXxx { ... }) - Parse `// depends:` comment-block declared deps - Parse `// disk_kb:` budget hint - Identify pub vs internal funcs (current: all `func` count as exports) Status: V2.0 P-6. 2026-05-27.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_html_extract.nx nx_doc_extractor_nx.nx nx_pipeline_graph_builder.nx nx_pipeline_walker.nx

imports: nx_syscalls.nxnx_html_extract.nx

imported by: nx_pipeline_graph_builder.nxnx_pipeline_walker.nx

structs

none

consts

34const NX_DXNX_OK: i64 = 0
35const NX_DXNX_BAD_INPUT: i64 = 3020
36const NX_DXNX_LOOP_BUDGET: i64 = 3021
39const NX_DXNX_MAX_BODY: i64 = 1048576 // 1 MB cap
40const NX_DXNX_LOOP_BUDGET_CAP: i64 = 10000000
43const NX_DXNX_ASCII_NL: i64 = 0x0A
44const NX_DXNX_ASCII_SLASH: i64 = 0x2F
45const NX_DXNX_ASCII_SPACE: i64 = 0x20
46const NX_DXNX_ASCII_TAB: i64 = 0x09
162const NX_DXNX_MAX_IMPORT_LEN: i64 = 128

functions

50func nx_dxnx_line_starts_with(src: *u8, line_off: i64, body_n: i64,
72func nx_dxnx_line_is_comment(src: *u8, line_off: i64, body_n: i64) -> i64
101func nx_doc_extract_nx_stats(body: *u8, body_n: i64,
164func nx_doc_extract_nx_imports(body: *u8, body_n: i64,
244func nx_doc_imports_iter_next(buf: *u8, buf_used: i64, off: i64,