code wiki / (root) / nx_browser_image_demo_test.nx

nx_browser_image_demo_test.nx

buildroot/runtime/nx_browser_image_demo_test.nx

4707 B117 linesdepth 9pulls 34 transitivereach 0 importersview sourcekind gate/prooftopic browser
docsdependenciesstructsconstsfunctions

about

nx_browser_image_demo_test.nx -- THE end-to-end image milestone. The Nishi browser fetches a REAL public JPEG over the live network using its own bits-up stack -- DNS resolver, BSD sockets, HTTP/1.1 request builder, response parser -- then decodes the JPEG bits-up (baseline Huffman + IDCT + level shift) and paints it as ASCII art in the terminal. No libc, no libjpeg, no curl, no Chrome. Every byte between the socket and the pixel is NishiLang. Target: http://httpbin.org/image/jpeg -- a 35 KB SOF0 (baseline) JPEG, the format our decoder handles. Fetched over plain HTTP so this milestone isolates the image pipeline; arbitrary-host HTTPS handshake interop is its own hardening track (see task: TLS RECV_SH_FAIL). Sovereign TLS 1.3 already fetches example.com. PASS = HTTP 200 + JPEG decode OK + ASCII raster emitted. The art is written to stdout so the result is visible, not just asserted. expect_exit: 0 license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_dns_resolve_a_record.nx nx_https_url_connect.nx nx_http_client.nx nx_http_response_parse.nx nx_jpeg_ascii.nx nx_browser_image_demo_test.nx

imports: nx_syscalls.nxnx_connect.nxnx_dns_resolve_a_record.nxnx_https_url_connect.nxnx_http_client.nxnx_http_response_parse.nxnx_jpeg_ascii.nx

imported by: nobody (leaf or entry point)

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

main nx_dns_resolve_default nx_dns_resolve_with_failov nx_dns_resolve_a_record sys_mmap nx_dns_build_query nx_dns_put_u16_be nx_dns_encode_name sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap sys_sendto sys_close sys_recvfrom nx_dns_parse_response_a nx_dns_get_u16_be nx_dns_skip_name dump_dec sys_mmap ↻ sys_write sys_socket ↻ sys_mmap ↻ nx_https_build_sockaddr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ nx_http_client_build_reque hc_put_caps sys_mmap ↻ nx_codec_caps_headers sys_mmap ↻ nx_codec_caps_accept_docum sys_mmap ↻ nx_codec_caps_accept_image cc_image_have

structs

none

consts

none

functions

30func dump_dec(label0: i64, label1: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
51func main() -> i64