nx_craft_emit.nx
buildroot/runtime/nx_craft_emit.nx
about
nx_craft_emit.nx -- THE SOVEREIGN CRAFT SHIP LANE (retires _ops/nx_emit_game.sh's laptop/WSL
dependency for /world/craft): gate-check -> .nx -> .wat -> .wasm -> page -> live docroot,
every stage BYTE-ASSERTED before the next runs (the emit script's founding law, organ form:
a green tool on empty input is not a check -- a 0-byte .wat once shipped a 20-byte "game").
The page itself is built IN-PROCESS by gpe_build (nx_game_page_emit as a LIB -- one emitter,
not a fork), and the deploy is tmp+rename with a READ-BACK byte+marker assert (what LANDED
is the claim, never what was written). Gate RED = refuses to emit anything at all.
usage: nx_craft_emit (runs from nishihost cwd like every registered tool)
exit: 0 SHIPPED | 2 gate-red | 3 wat | 4 wasm | 5 page | 6 deploy | 7 readback
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_game_page_emit.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
| 14 | const CE_GATE: *u8 = "nx_wasm_craft_gate.elf" |
| 15 | const CE_CWAT: *u8 = "nx_compile_wat.elf" |
| 16 | const CE_WATC: *u8 = "nx_wat_compiler.elf" |
| 17 | const CE_SRC: *u8 = "buildroot/runtime/nx_wasm_craft.nx" |
| 18 | const CE_WAT: *u8 = "buildroot/_build/nx_wasm_craft_emit.wat" |
| 19 | const CE_WASM: *u8 = "buildroot/_build/nx_wasm_craft_emit.wasm" |
| 20 | const CE_TMP: *u8 = "sites/nishifamily/world/craft.html.stage" |
| 21 | const CE_OUT: *u8 = "sites/nishifamily/world/craft.html" |
| 22 | const CE_TITLE: *u8 = "NISHI CRAFT - SOVEREIGN 3D" |
| 23 | const CE_NATIVE: *u8 = "nx_desktop_craft" |
| 26 | const CE_TMP2: *u8 = "sites/nishifamily/world/beach.html.stage" |
| 27 | const CE_OUT2: *u8 = "sites/nishifamily/world/beach.html" |
| 28 | const CE_TITLE2: *u8 = "NISHI SHORE - REVIEW STAGE" |
| 29 | const CE_CTRL2: *u8 = "the flat-light REVIEW STAGE: mixed beachwear across the cast (bred, stable per girl) · same engine, same controls as <a href=\"craft\">NISHI CRAFT</a> · ?review=1 auto-frames the nearest girl<br>ISEKAI: cross to <a href=\"craft\">NISHI CRAFT</a> or <a href=\"vale\">NISHI VALE</a> — level, ledger and party come along" |
| 32 | const CE_TMP3: *u8 = "sites/nishifamily/world/vale.html.stage" |
| 33 | const CE_OUT3: *u8 = "sites/nishifamily/world/vale.html" |
| 34 | const CE_TITLE3: *u8 = "NISHI VALE - THE MEDIEVAL HIGHLAND" |
| 35 | const CE_CTRL3: *u8 = "deep woods, cold snowline, cave-riddled stone — and wardens who hunt WIDE by day · your traveler arrives with his ledger, his level and his party from <a href=\"craft\">NISHI CRAFT</a> or <a href=\"beach\">NISHI SHORE</a> · <b>G</b> invites a bonded girl to your party · same controls" |
| 36 | const CE_CTRL: *u8 = "click canvas = MOUSELOOK (Esc frees) · <b>WASD</b> move · <b>SPACE</b> jump · L/R-click or <b>E</b>/<b>B</b> break/place · <b>Q</b> cycles 7 slots (blocks · HOE · SEEDS) · till grass, plant, let rain or a pond do the rest, break the GOLDEN crop = harvest · <b>E</b> on a girl = meet her, <b>G</b> invites her to your party · nights are the wardens' · <b>H</b> home · gamepad + touch<br>ISEKAI: your level, ledger and party travel with you — walk into <a href=\"beach\">NISHI SHORE</a> or <a href=\"vale\">NISHI VALE</a> · <a href=\"craft_immersion\">what is broken and what is next</a>" |
| 37 | const CE_MIN_WAT: i64 = 500000 |
| 38 | const CE_MIN_WASM: i64 = 50000 |
| 39 | const CE_MIN_PAGE: i64 = 100000 |
| 40 | const CE_MODE: i64 = 0x1a4 |
functions
| 42 | func ce_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 43 | func ce_puts(s: *u8) -> i64 { sys_write(1, s, ce_slen(s)); return 0 } |
| 44 | func ce_pn(v: i64) -> i64 |
| 58 | func ce_run(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 77 | func ce_find(hay: *u8, n: i64, needle: *u8) -> i64 |
| 90 | func ce_fsize(p: *u8) -> i64 |
| 97 | func main() -> i64 |
| 151 | func ce_ship(out: *u8, pn: i64, tmpp: *u8, outp: *u8) -> i64 |