code wiki / (root) / nx_coindex.nx

nx_coindex.nx

buildroot/runtime/nx_coindex.nx

3274 B65 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tooltopic coindex
docsdependenciesstructsconstsfunctions

about

nx_coindex.nx -- CLI of the conflict-free co-edited index (R-ORCH-2). The parallel-safe way for many sessions to maintain ONE shared index (MEMORY.md, the board) with ZERO merge conflicts: each session APPENDS its slug-keyed entry (atomic under the flock floor); the index is DERIVED. usage: nx_coindex append <journal> <slug> <entry...> -- append one entry (conflict-free; never edits peers) nx_coindex emit <journal> -- print the derived index (last-write-wins per slug) lock = <journal>.lock. Exit 0 ok, 2 usage. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_coindex_core.nx nx_coindex.nx

imports: nx_syscalls.nxnx_coindex_core.nx

imported by: nobody (leaf or entry point)

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

main c_puts sys_write c_streq sys_mmap ci_emit sys_mmap ↻ ccz_read sys_openat_rd sys_read sys_close ci_slug_end ci_slug_eq sys_write ↻ ccz_cat_str ccz_read ↻ ci_append ci_lock sys_openat_wr sys_flock sys_close ↻ sys_openat_append ci_unlock sys_flock ↻ sys_close ↻ sys_mmap ↻ ccz_cat_str ↻ sys_write ↻ sys_close ↻

structs

none

consts

11const K_MAGIC_262144: i64 = 262144
12const K_MAGIC_1024: i64 = 1024
13const K_MAGIC_8192: i64 = 8192
14const K_MAGIC_8190: i64 = 8190

functions

16func c_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
17func c_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
19func main(argc: i64, argv: *i64) -> i64