code wiki / _hdl_build / nx_spore_syscalls.nx

nx_spore_syscalls.nx

buildroot/runtime/_hdl_build/nx_spore_syscalls.nx

1989 B56 linesdepth 0pulls 0 transitivereach 2 importersview sourcekind librarytopic spore
docsdependenciesstructsconstsfunctions

about

nx_spore_syscalls.nx -- the SPORE's minimal syscall surface. The full nx_syscalls.nx carries ~40 wrappers (socket/connect/sendto/execve/ fork/getdents/clock...) -- everything the MATURE system eventually needs. The SPORE needs only the six to verify a piece and measure itself, and a NishiLang build links the whole imported module (no dead-code elimination yet), so a spore that imported the full surface dragged ~6 KB of wrappers it never calls. This is the architecturally-correct bootstrap: the spore carries the SMALLEST syscall surface that lets it (a) read bytes, (b) verify them, (c) know its own footprint. The richer surface (networking, processes, dirs) arrives as later SEED pieces, germinated through the same trust gate. Additive: this does NOT modify the protected shared nx_syscalls.nx. Dual-target (RV64 default / x86_64 under --target) preserved exactly.

dependencies 0 imports · 2 importers

nx_spore_syscalls.nx nx_race_kernel.nx nx_spore_min_test.nx

imports: none

imported by: nx_race_kernel.nxnx_spore_min_test.nx

structs

none

consts

18const SYS_WRITE: i64 = 1
19const SYS_CLOSE: i64 = 3
20const SYS_LSEEK: i64 = 8
21const SYS_OPENAT: i64 = 257
22const SYS_EXIT: i64 = 60
23const SYS_MMAP: i64 = 9
27const SYS_WRITE: i64 = 64
28const SYS_CLOSE: i64 = 57
29const SYS_LSEEK: i64 = 62
30const SYS_OPENAT: i64 = 56
31const SYS_EXIT: i64 = 93
32const SYS_MMAP: i64 = 222
35const AT_FDCWD: i64 = -100
36const O_RDONLY: i64 = 0

functions

38func sys_write(fd: i64, buf: *u8, count: i64) -> i64
41func sys_close(fd: i64) -> i64
called by 1: main
44func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64
called by 1: main
47func sys_exit(code: i64) -> i64
called by 2: mainmain
50func sys_mmap(size: i64) -> *u8
called by 2: rk_emit_dec_emit
54func sys_openat_rd(path: *u8) -> i64
called by 1: main