code wiki / _hdl_build / nx_mp_up.nx

nx_mp_up.nx

buildroot/runtime/_hdl_build/nx_mp_up.nx

6340 B122 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic mp
docsdependenciesstructsconstsfunctions

about

nx_mp_up.nx -- SOVEREIGN bring-up for the multiplayer daemon (the build->launch->verify->publish loop, the operator's "no guessing if it's live"). Pure NishiLang orchestration: builds nx_mp_serve via the WOMB in --build-only mode, fork+setsid+execve's it DETACHED (sovereign nohup, survives this command's exit), then does a SOVEREIGN HTTP liveness check (sys_socket/connect/write/read -- NO curl, NO node) and prints the live URL. Modes: up (default) / down / status. Build+run: ./_offc/nx_sov_build_run.elf nx_mp_up license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_connect.nx nx_mp_up.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_connect.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap mu_streq mu_read_pid sys_openat_rd sys_mmap ↻ sys_read sys_close nx_kill mu_puts sys_write mu_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_exit mu_check sys_mmap ↻ sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ sys_write ↻ sys_read ↻ sys_fork nx_setsid sys_openat_wr sys_dup3 sys_execve mu_write_pid sys_openat_wr ↻ sys_mmap ↻ sys_write ↻ sys_close ↻

structs

none

consts

10const K_MAGIC_1024: i64 = 1024
11const K_MAGIC_7702: i64 = 7702

functions

13func mu_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
18func mu_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
19func mu_streq(a: *u8, b: *u8) -> i64
called by 1: main
25func mu_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
26func mu_write_pid(path: *u8, pid: i64) -> i64
37func mu_read_pid(path: *u8) -> i64
46func mu_build(womb: *u8, name: *u8, envp: *i64) -> i64
58func mu_check(port: i64) -> i64
79func main(argc: i64, argv: *i64) -> i64