nx_corpus_to_meta.nx
buildroot/runtime/nx_corpus_to_meta.nx
about
nx_corpus_to_meta.nx -- compact-corpus -> meta.json minter.
Reads specs/algo_corpus.txt (one primitive per line, pipe-separated
KV pairs) and emits specs/algo_registry/<name>/meta.json for each.
Removes the last manual authoring layer beyond shape-design.
Line format (TAB-separated):
<name><TAB><nx_module><TAB><shape><TAB><summary><TAB><KEY>=<VALUE><TAB><KEY>=<VALUE><TAB>...
First 4 fields are positional: name, nx_module, shape, summary_plain.
Remaining fields are KEY=VALUE pairs that become template_params.
TAB is the separator (not `|`) because `|` collides with the
bitwise-OR operator used inside body code.
genealogy_id: substrate_corpus_minter_2026_05_14
lineage_id: compact_format_codegen
license: public_domain
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_fcntl.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 30 | const STDOUT: i64 = 1 |
| 31 | const NX_CORPUS_PATH_BUF: nx_size = 512 |
| 32 | const NX_CORPUS_FIELD_CAP: nx_size = 1024 |
functions
| 34 | func write_str_corp(fd: i64, s: *u8) -> nx_int |
| 41 | func corp_mkdir(path: *u8) -> nx_int called by 1: emit_meta_from_line |
| 47 | func find_char(buf: *u8, start: nx_idx, end: nx_idx, c: nx_int) -> nx_idx called by 1: emit_meta_from_line |
| 57 | func copy_slice(buf: *u8, lo: nx_idx, hi: nx_idx, out: *u8) -> nx_size called by 1: emit_meta_from_line |
| 69 | func emit_meta_from_line(buf: *u8, line_lo: nx_idx, line_hi: nx_idx) -> nx_int |
| 169 | func main() -> i64 |