code wiki / _hdl_build / nx_oo_extract.nx

nx_oo_extract.nx

buildroot/runtime/_hdl_build/nx_oo_extract.nx

10878 B239 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_oo_extract.nx -- BYTE-PROVEN OO DUP-FUNCTION EXTRACTOR (the real "object-oriented without losing functionality" operation, unblocked by the 2026-07-21 byte-equiv proof). Moves a function that is DUPLICATED byte-identically across N consumers into a shared base lib, repoints each consumer to import it, and COMMITS only if EVERY consumer's rebuild is BYTE-IDENTICAL to before (else REVERTS all). never-brick + rule-13 (originals backed up). Every refusal carries verdict+reason+fix (operator law). argv: <funcname> <baselib-srcpath> <buildonly-elf> <consumer-srcpath1> [consumer-srcpath2 ...] exit: 0 EXTRACTED | 1 REFUSED(reverted) | 2 usage/precondition | 3 io/build error(reverted) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_seat_drive_lib.nx nx_seg_store.nx nx_deploy_lib.nx nx_syscalls.nx nx_oo_extract.nx

imports: nx_seat_drive_lib.nxnx_seg_store.nxnx_deploy_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sd_w sys_write sys_exit sys_mmap oe_base oe_read sys_openat_rd sys_read sys_close oe_find_func oe_eq oe_target oe_base ↻ sd_cat oe_build_snap sys_mmap ↻ sd_cat ↻ sys_unlinkat dep_run_capture sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve_clean sys_close ↻ sys_execve sys_exit ↻ sys_wait4 oe_read ↻ ss_writefile sys_openat_wr ↻ sys_write ↻ sys_close ↻ sys_fsync ss_writefile ↻ sd_num sys_mmap ↻ sys_unlinkat ↻

structs

none

consts

14const OE_CAP: i64 = 2097152
15const OE_MAXC: i64 = 128

functions

17func oe_read(path: *u8, buf: *u8, cap: i64) -> i64
26func oe_isid(c: i64) -> i64
33func oe_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64 = 0; while i < an { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
35func oe_find_func(buf: *u8, n: i64, fname: *u8, out: *i64) -> i64
called by 1: main
82func oe_build_snap(buildelf: *u8, target: *u8, snappath: *u8, buf: *u8) -> i64
96func oe_base(path: *u8, out: *u8) -> i64
called by 2: oe_targetmain
107func oe_target(path: *u8, out: *u8) -> i64
called by 1: main calls 1: oe_base
113func main(argc: i64, argv: *i64) -> i64