code wiki / (root) / nx_ship.nx

nx_ship.nx

buildroot/runtime/nx_ship.nx

5521 B97 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_ship.nx -- ONE sovereign command for the whole edit->build loop: pack a source dir, upload it over sovereign TLS-1.3 with a minted mgmt session, unpack it into the NAS buildroot, and compile the target ON THE NAS -- zero scp/curl/tar. Orchestrates the proven organs (nx_treepack + nx_mgmt_client) by fork+capture, gating on each step's success marker. Deploy is intentionally NOT here (destructive; run `nx_mgmt POST /api/deploy` deliberately). nx_ship <target> <tokenfile> <srcdir> <target> the runtime organ name to compile (its source must exist in the synced buildroot/runtime) <tokenfile> a file holding a valid X-Nishi-Session token (mint: nx_mgmt_session_mint on the NAS) <srcdir> the local dir to sync (paths are taken RELATIVE to it -> land under buildroot/runtime); use a small staged mirror for a lean incremental sync, or `runtime` for a full re-sync.

dependencies 1 imports · 0 importers

nx_tool_run.nx nx_ship.nx

imports: nx_tool_run.nx

imported by: nobody (leaf or entry point)

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

main ship_puts ship_slen

structs

none

consts

11const K_MAGIC_1048576: i64 = 1048576

functions

13func ship_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
14func ship_puts(s: *u8) -> i64 { sys_write(1, s, ship_slen(s)); return 0 }
called by 1: main calls 1: ship_slen
17func ship_contains(buf: *u8, n: i64, needle: *u8) -> i64
calls 1: ship_slen
31func ship_write_body(path: *u8, content: *u8) -> i64
40func ship_run(path: *u8, av: *i64, out: *u8, cap: i64, olen: *i64) -> i64
calls 1: tr_run_capture
45func main(argc: i64, argv: *i64) -> i64
calls 1: ship_puts