nx_swarm_lib.nx
buildroot/runtime/nx_swarm_lib.nx
about
nx_swarm_lib.nx -- SWARM FABRIC shared lib: the NODE-row contract (validate/freshness), bounded
reads, and the CLI path law. Single source of truth for the fabric wire format -- consumed by
nx_swarm_beat (store) + nx_swarm_place (placement brain). Extracted 2026-07-15 (SF-R2).
Row contract (v2 positional, emitted by nx_node_beacon):
NODE <name> <cpu> <load> <ncpu> <lpc> <memu> <mema> <memt> <conns> <ts_us> <temp_mc> <batt_pct>
license_tier: ORIGINAL
dependencies 2 imports · 6 importers
imports: nx_syscalls.nxnx_framed_append.nx
imported by: nx_swarm_coord.nxnx_swarm_job.nxnx_swarm_maturity.nxnx_swarm_pack.nxnx_swarm_place.nxnx_swarm_tile.nx
structs
| none |
consts
| 9 | const K_MAGIC_60000000: i64 = 60000000 |
| 10 | const K_MAGIC_1000000: i64 = 1000000 |
functions
| 13 | func sb_path_ok(p: *u8) -> i64 |
| 47 | func sb_read(path: *u8, buf: *u8, cap: i64) -> i64 called by 11: sj_read_journalmt_file_hasmt_grade_dimsmt_auto_matrixmainsk_load_pool+5 calls 3: sys_openat_rdsys_readsys_close |
| 63 | func sb_has(buf: *u8, n: i64, needle: *u8) -> i64 |
| 78 | func sb_pint(buf: *u8, n: i64, p: i64, vout: *i64, pend: *i64) -> i64 |
| 99 | func sb_validate(row: *u8, n: i64, nso: *i64, nlo: *i64, tso: *i64) -> i64 |
| 147 | func sb_fields(row: *u8, n: i64, f: *i64) -> i64 |
| 167 | func sb_fresh(ts: i64, now: i64, window_sec: i64) -> i64 called by 1: sp_score |