code wiki / _hdl_build / nx_cp.nx

nx_cp.nx

buildroot/runtime/_hdl_build/nx_cp.nx

1999 B35 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_cp.nx -- sovereign file copy (read src, write dst as an executable, mode 0755). Exists to INSTALL the womb's /tmp build output into a PERSISTENT path (_offc/ on /mnt/c) so the CLI organs survive a WSL idle shutdown without rebuilding -- the /tmp build target is volatile (tmpfs wiped when the WSL VM idles). No sh. usage: nx_cp <src> <dst> license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_cp.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close cp_w sys_write ↻ sys_openat_wr sys_close ↻ cp_wn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

none

functions

9func cp_w(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
14func cp_wn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
16func main(argc: i64, argv: *i64) -> i64