nx_hello_off_c.nx source
↩ module page · 18 lines · 700 B
1// hello_off_c.nx -- the smallest "off C" demonstration.
2//
3// A standalone NishiLang program that exits with code 30.
4// Used by the off-c stage-1 bootstrap proof to verify that nxc.elf
5// can compile programs OTHER than its baked-in demo.
6//
7// Why exit 30: matches the demo's chosen sentinel so the same
8// validation pipeline works.
9//
10// NOTE: deliberately has NO `import` directives. __syscall is
11// a nxc2 intrinsic, not a runtime function. Imports trigger
12// expand_imports's file-system walk, which under Docker requires
13// the runtime/ tree to be visible -- skip that wrinkle for the
14// stage-1 proof.
15
16func main() -> i64 {
17 return __syscall(93, 30, 0, 0, 0, 0, 0)
18}