code wiki / _hdl_build / nx_asset_emit_gen.nx
nx_asset_emit_gen.nx
buildroot/runtime/_hdl_build/nx_asset_emit_gen.nx
about
nx_asset_emit_gen.nx -- EMITTER-GENERATOR: turns any text asset into a NISHILANG EMITTER ORGAN,
making the .nx the SSOT and the asset a generated artifact (operator 2026-07-02: "use and build up
the nishi ecosystem including nishi lang" -- the last mile must be EMITTED by an organ, never
hand-edited). usage: nx_asset_emit_gen <asset> <out.nx> <organ_name> <target_path>
The generated organ: main(argc,argv) emits the asset bytes to <target_path> (argv[1] overrides the
target -- that is the DRIFT-KILL seam: emit to a compare path, byte-diff vs the canonical file).
Escaping: printable ASCII raw; '"'->\" '\\'->\\ LF->\n; all else -> \xHH with a FORCED literal
break when the next byte is a hex digit (so the lexer can never over-consume the escape).
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 11 | const K_MAGIC_65536: i64 = 65536 |
| 12 | const K_MAGIC_1200: i64 = 1200 |
functions
| 14 | func gl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 15 | func ap(b: *u8, n: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){b[n+i]=s[i];i=i+1} return n+i } called by 1: main |
| 16 | func apn(b: *u8, n: i64, v: i64) -> i64 |
| 19 | func hexd(v: i64) -> i64 { if v < 10 { return 48 + v } return 87 + v } // 0-9 a-f called by 1: main |
| 20 | func ishex(c: i64) -> i64 called by 1: main |
| 26 | func main(argc: i64, argv: *i64) -> i64 |