nx_tool_ping.nx source
↩ module page · 14 lines · 636 B
1// nx_tool_ping.nx -- the canonical no-op smoke-test organ for the executable API. It does exactly one thing:
2// print a fixed sentinel and exit 0. Zero inputs, zero side effects, no files, no network -- so it is the
3// SAFE tool to put on the execution allowlist (nx_tool_exec_allow) first, to prove /mcp tools/call really
4// forks+captures a real organ end-to-end without risking anything. license_tier: ORIGINAL expect_exit: 0
5import "nx_syscalls.nx"
6
7func main() -> i64 {
8 let s: *u8 = "NX_TOOL_PING_OK\n" as *u8
9 var n: i64 = 0
10 while s[n] != (0 as u8) { n = n + 1 }
11 sys_write(1, s, n)
12 sys_exit(0)
13 return 0
14}