code wiki / _hdl_build / nx_b64_cli.nx

nx_b64_cli.nx

buildroot/runtime/_hdl_build/nx_b64_cli.nx

1798 B36 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_base64.nx nx_b64_cli.nx

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

main bc_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close b64_encode b64_enc_char sys_write ↻ sys_openat_wr sys_close ↻

structs

none

consts

12const BC_MAX_IN: i64 = 8388608
13const BC_MAX_OUT: i64 = 12582912

functions

15func 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 }
called by 1: main calls 1: sys_write
17func main(argc: i64, argv: *i64) -> i64