code wiki / _hdl_build / nx_b64_cli.nx
nx_b64_cli.nx
buildroot/runtime/_hdl_build/nx_b64_cli.nx
about
nx_b64_cli.nx -- base64 a file to stdout (and optionally to a file).
WHY THIS EXISTS: runtime/nx_base64.nx carries a complete b64_encode/b64_decode pair and NO main, so the
capability could not be INVOKED -- the same shape as rf_fetch_bank before nx_research_fetch_cli, and the
reason evidence work kept stalling on "the bytes are NAS-side and the third-party decoder is laptop-side".
A text-safe transport turns any binary artifact (a rendered PNG, an emitted wasm) into something an
external validator can be handed, which is exactly what an EXPERIENTIAL witness needs.
usage: nx_b64_cli <infile> [outfile] exit 0 ok, 1 usage, 2 unreadable
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_base64.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
| 12 | const BC_MAX_IN: i64 = 8388608 |
| 13 | const BC_MAX_OUT: i64 = 12582912 |
functions
| 15 | func bc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func main(argc: i64, argv: *i64) -> i64 |