code wiki / _hdl_build / nx_compose_builder.nx

nx_compose_builder.nx

buildroot/runtime/_hdl_build/nx_compose_builder.nx

7760 B115 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_compose_builder.nx -- X-AUTH-EXT-001 (operator 2026-06-13 deepened anti-cheat): the COMPOSITION-AUTHORING capability. Where nx_auto_builder authors bounded SHAPES (FSM/MATH/TLV), THIS authors PIPELINE/COMPOSITION organs from a DATA spec -- so the team (not Claude) authors the composition/IO organs (deploy, library, publish) too. It is the authoring TOOL (tutor-built, like nx_auto_builder); it AUTHORS the organ from a spec (Claude writes the spec, the tool emits the code). Spec: `name <mod>` + one `step <label>` line per pipeline stage. Emits <mod>.nx -- a fail-fast sequencer `<mod>_run(codes,n)` (0 if all stages exit 0, else 1-based index of the first failure = abort/rollback point) + a KAT computed HERE from the step count. nx_sov_build_run then builds+gates the authored organ. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_compose_builder.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cb_puts sys_write sys_mmap cb_read sys_openat_rd sys_read sys_close cb_scan cb_starts sys_openat_wr cb_w sys_write ↻ cb_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_close ↻ cb_putn nxi_out nxi_fd ↻

structs

none

consts

12const K_MAGIC_20000: i64 = 20000

functions

14func cb_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
19func cb_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
20func cb_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
25func cb_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
27func cb_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
36func cb_scan(buf: *u8, n: i64, start: i64, delim: i64) -> i64 { var i: i64 = start; var s: i64 = 1; while s == 1 { if i >= n { s = 0 } else { if buf[i] == (delim as u8) { s = 0 } else { i = i + 1 } } } return i }
called by 1: main
37func cb_starts(buf: *u8, a: i64, e: i64, pre: *u8) -> i64 { var i: i64 = 0; while pre[i] != (0 as u8) { if a + i >= e { return 0 } if buf[a + i] != pre[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
39func main(argc: i64, argv: *i64) -> i64