code wiki / _hdl_build / nx_library_publish.nx

nx_library_publish.nx

buildroot/runtime/_hdl_build/nx_library_publish.nx

9235 B163 linesdepth 10pulls 22 transitivereach 2 importersview sourcekind tooltopic library
docsdependenciesstructsconstsfunctions

about

nx_library_publish.nx -- MLIB-020 (CALLOUT-012, operator 2026-06-13: publish to nishifamily.com/wiki BEHIND the user login; see+work anywhere, synced). The AUTH-GATED PUBLISH organ: serve the nishi-library dashboard ONLY to a valid OPAQUE-login session, else 302 -> /wiki/login (data NEVER served unauthenticated -- the security property). Composes PROVEN organs: nx_no_cookie_session (Ed25519 session mint/validate, the per-request gate nx_modern_auth_validate_session is built on) + nx_web_builder (responsive render) + a LIVE read of assignment_queue.tsv (build-status sync -- the page reflects current DONE rungs). Self-validating gate (PUBLISHGATE): valid-session->served, forged/expired->DENIED, build-status reflects live queue. Live socket serving rides nx_http_server; remote deploy = MLIB-022 (operator-triggered). license_tier: ORIGINAL

dependencies 5 imports · 2 importers

nx_syscalls.nx nx_itoa_lib.nx nx_ed25519_signature.nx nx_no_cookie_session.nx nx_web_builder.nx nx_library_publish.nx nx_library_sync.nx nx_synth_matrix.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_ed25519_signature.nxnx_no_cookie_session.nxnx_web_builder.nx

imported by: nx_library_sync.nxnx_synth_matrix.nx

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

main sys_mmap ed25519_pub_from_priv sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 rotr64_v shr64_v sha512_gamma1 rotr64_v ↻ shr64_v ↻ sha512_sigma1 rotr64_v ↻ sha512_ch sha512_k sha512_sigma0 rotr64_v ↻ sha512_maj sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ ge_p3_alloc sys_mmap ↻ fe_alloc nx_scratch nx_scratch_init sys_mmap ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻

structs

none

consts

16const LP_MAGIC_4000: i64 = 4000
17const LP_MAGIC_400000: i64 = 400000
18const LP_MAGIC_60000: i64 = 60000
20const LP_NOW: i64 = 1000000
21const LP_TTL: i64 = 3600
22const LP_OUT: *u8 = "knowledge/nishi-library-dashboard.html"
23const LP_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"

functions

25func lp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
30func lp_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
35func lp_wfn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 2: mainls_sync_render calls 1: nxi_fd
36func lp_wbuf(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
38func lp_readfile(path: *u8, buf: *u8, cap: i64) -> i64
47func lp_contains(buf: *u8, n: i64, needle: *u8) -> i64
54func lp_scan(buf: *u8, n: i64, start: i64, delim: i64) -> i64 { var i: i64 = start; var s: i64 = 1; while s == 1 { if i >= n { s = 0 } else { if buf[i] == (delim as u8) { s = 0 } else { i = i + 1 } } } return i }
called by 2: lp_count_donemain
55func lp_startswith(buf: *u8, a: i64, e: i64, pre: *u8) -> i64 { var i: i64 = 0; while pre[i] != (0 as u8) { if a + i >= e { return 0 } if buf[a + i] != pre[i] { return 0 } i = i + 1 } return 1 }
called by 2: lp_count_donemain
56func lp_rangehas(buf: *u8, a: i64, e: i64, needle: *u8) -> i64 { var m: i64 = 0; while needle[m] != (0 as u8) { m = m + 1 } if m == 0 { return 0 } var i: i64 = a; while i + m <= e { var j: i64 = 0; var ok: i64 = 1; while j < m { if buf[i + j] != needle[j] { ok = 0; j = m } else { j = j + 1 } } if ok == 1 { return 1 } i = i + 1 } return 0 }
called by 1: lp_count_done
59func lp_count_done(buf: *u8, n: i64) -> i64
75func lp_card(fd: i64, t: *u8, b: *u8) -> i64 { wb_card(fd, t, b); return 0 }
called by 1: main calls 1: wb_card
77func main() -> i64