nx_sovereign_runner.nx
buildroot/runtime/nx_sovereign_runner.nx
about
nx_sovereign_runner.nx -- read an ELF off disk via OUR fs primitive,
load it into OUR simulator, step every instruction in NishiLang.
Demonstrates the full sovereign chain operating on a real file:
sys_read_file (NishiLang) read ELF bytes from disk
nx_loader_load (NishiLang) parse + place segments
nx_rv64_cpu_new (NishiLang) initialize CPU
nx_rv64_run (NishiLang) step every instruction
Hardcoded path "/tmp/nx_sov_inner.elf" — caller stages the file
there before invoking. Once nx_argv is hooked up to main(), the
path becomes argv[1].
Exits with:
0 = ran successfully, propagates inner.exit_code via sys_exit
(so smoke script sees the inner program's exit code directly)
1 = file read failed
2 = loader rejected
3 = simulator step error
4 = simulator did not halt
dependencies 3 imports · 0 importers
imports: syscalls.nxnx_loader.nxnx_rv64_sim.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 31 | const K_MAGIC_16777216: i64 = 16777216 |
| 32 | const K_MAGIC_10000000: i64 = 10000000 |
functions
| 34 | func main() -> i64 |