code wiki / _hdl_build / nx_explodelab_treegen.nx

nx_explodelab_treegen.nx

buildroot/runtime/_hdl_build/nx_explodelab_treegen.nx

9303 B217 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic explodelab
docsdependenciesstructsconstsfunctions

about

nx_explodelab_treegen.nx -- GENERATOR for the ExplodeLab wasm surface (build generators, not hand-authored artifacts): parses the REAL banked as1-oc-214.stp (nx_step_parse R1a), runs the SAME deterministic DFS layout law as nx_explode3d_gate (ex3_oct/ex3_rad/ex3_dyv), and EMITS: 1. runtime/nx_explodelab_tree.nx -- data module (part count + per-part kind/depth/home/dir accessors) so the wasm surface needs NO file IO and NO STEP parser on the client. 2. knowledge/explodelab_bom.txt -- BOM panel lines (idx, name, depth) for the HTML packager. Re-run after R1b tessellation or a different STEP file. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_step_parse.nx nx_explode3d.nx nx_explodelab_treegen.nx

imports: nx_step_parse.nxnx_explode3d.nx

imported by: nobody (leaf or entry point)

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

main tw sp_read_file sys_openat_rd sys_read sys_close sp_init sys_mmap sp_scan sp_skip_string sp_skip_comment sp_statement sp_isspace sp_isnamec sp_args_span sp_skip_string ↻ sp_nauo_collect sp_name_is sp_arg_span sp_skip_string ↻ sp_span_ref sp_isspace ↻ ex3_oct ex3_rad ex3_dyv sp_pd_product sp_find sp_name_is ↻ sp_first_ref sp_skip_string ↻ sp_name_prefix sp_prod_name_is sp_name_is ↻ sp_arg_span ↻ sp_isspace ↻ tn tw ↻ sys_openat_wr exl_n

structs

none

consts

10const K_MAGIC_4194304: i64 = 4194304
11const K_MAGIC_524288: i64 = 524288
12const K_MAGIC_2048: i64 = 2048
13const K_MAGIC_1024: i64 = 1024
14const K_MAGIC_2200: i64 = 2200
15const K_MAGIC_16384: i64 = 16384

functions

17func tw(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 4: tntnametemitmain
18func tn(fd: i64, v: i64) -> i64
called by 2: temitmain calls 1: tw
33func tname(st: *i64, prodidx: i64, fd: i64, out2: *i64) -> i64
57func temit(fd: i64, fname: *u8, vals: *i64, n: i64) -> i64
calls 2: twtn
68func main() -> i64