code wiki / (root) / nx_png_real_smoke.nx

nx_png_real_smoke.nx

buildroot/runtime/nx_png_real_smoke.nx

8842 B235 linesdepth 9pulls 19 transitivereach 0 importersview sourcekind smoketopic png
docsdependenciesstructsconstsfunctions

about

nx_png_real_smoke.nx -- end-to-end PNG decode verification. CAPABILITY_COMPLETENESS: FULL Constructs a valid 1x1 RGB PNG byte-for-byte at runtime (computing chunk CRC32s and zlib Adler-32 via the shipped substrate primitives), then decodes it via nx_png_decode + the full v0 grader pipeline, asserting: - decoder produces (1, 1) RGB pixel matching the source - grader returns OK + correctly-classed verdict This is the smoke the user explicitly asked for: the bridge from "compile-clean" to "actually works against a real PNG file." No external file needed; the smoke is fully self-contained. genealogy_id: substrate_png_e2e_verification_2026_05_16 lineage_id: nx_png_real_smoke_v1

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_crc32.nx nx_adler32.nx nx_png_decoder.nx nx_image_grade_v0.nx nx_png_real_smoke.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_crc32.nxnx_adler32.nxnx_png_decoder.nxnx_image_grade_v0.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap _png_smoke_build _png_smoke_write_u32_be nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at adler32 nx_png_decode sys_mmap ↻ _png_check_signature _png_read_u32_be nx_crc32 ↻ _png_n_channels _png_bytes_per_pixel _png_n_channels ↻ _png_a7_expected _png_a7_col0 _png_a7_coli _png_a7_row0 _png_a7_rowi nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl sys_mmap ↻ nx_huffman_build _deflate_build_static_dist sys_mmap ↻

structs

none

consts

none

functions

36func _png_smoke_write_u32_be(buf: *u8, off: nx_int, value: nx_int) -> nx_int
called by 1: _png_smoke_build
48func _png_smoke_build(r_val: nx_int, g_val: nx_int, b_val: nx_int,
155func main() -> nx_int