code wiki / (root) / nx_meal_emit.nx

nx_meal_emit.nx

buildroot/runtime/nx_meal_emit.nx

11035 B187 linesdepth 7pulls 16 transitivereach 0 importersview sourcekind tooltopic meal
docsdependenciesstructsconstsfunctions

about

nx_meal_emit.nx -- MAIN: SEED the meal stores and RENDER the page. Idempotent end to end (rule 10): every seed is a value-compare put that writes nothing when unchanged, and the render simply overwrites its artifact. Run it twice, get the same estate. IT OWNS STORES AND MARKUP, AND NOTHING ELSE. Preserving the origin page is nx_meal_capture's job, in its own organ, because the decompressor it needs drags nx_runtime/nx_tier/nx_deflate/nx_crc32 in behind it and that destabilised the seg-store seeding here -- untouched code that had been green minutes before. Splitting on the job boundary (rule 9) was the fix, not a workaround: this organ reads the finished WARC and never decodes anything. It writes the page to a FILE and stops. Publishing is a separate deliberate act through nx_site_publish -- a renderer that also deploys is a renderer you cannot safely run just to look at the output. argv[1] = output html path (default /tmp/kitchen.html) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 6 imports · 0 importers

nx_meal_page.nx nx_meal_source.nx nx_meal_cost.nx nx_meal_plan.nx nx_adnet_slot.nx nx_syscalls.nx nx_meal_emit.nx

imports: nx_meal_page.nxnx_meal_source.nxnx_meal_cost.nxnx_meal_plan.nxnx_adnet_slot.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

22const ME_MAGIC_1099: i64 = 1099
23const ME_MAGIC_1249: i64 = 1249
25const ME_PAGE: i64 = 262144
26const ME_WARC: i64 = 4194304
27const ME_MODE: i64 = 420
28const ME_DAY: i64 = 20671
33const ME_SALE_FLOOR_CENTS: i64 = 50
36const ME_INTAKE_PORT: i64 = 8033

functions

38func me_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
calls 1: sys_write
39func me_n(v: i64) -> i64
55func me_port_open(port: i64) -> i64
72func me_write_file(path: *u8, buf: *u8, n: i64) -> i64
80func main(argc: i64, argv: *i64) -> i64