nx_browse_text.nx
buildroot/runtime/nx_browse_text.nx
about
nx_browse_text.nx -- production-shaped browser fetch entry point.
Compose: TCP connect → send HTTP GET → drain response → HTTP-parse
→ HTML→text → caller-owned buffer. This is the actual callable
API the sovereign browser exposes for text-mode page fetch.
Distinct from nx_https_get (HTTPS path is gated on the X.509
chain-validation arc, queued separately). This module ships the
PLAINTEXT HTTP/1.1 path because every piece it depends on is
already proven (TCP loopback works, nx_http_response_parse passes
6 KATs, nx_html_to_text passes 6 KATs).
CAPABILITY_COMPLETENESS: PARTIAL. MISSING_CAPABILITIES:
- TLS (separate nx_https_get arc, depends on X.509 chain
validation)
- Redirect following (3xx Location header)
- Chunked transfer dechunking before render
- gzip / deflate Content-Encoding
- HTTP/2 + HTTP/3
Per [[feedback-no-skip-paths-as-error-codes]] these are named
follow-on arcs, NOT silent gaps.
Built per F7 post-order DFS: callees defined before callers.
expect_exit: 0
license_tier: ORIGINAL
dependencies 4 imports · 6 importers
imports: nx_syscalls.nxnx_connect.nxnx_http_response_parse.nxnx_html_to_text.nx
imported by: _inet_fetch_authored.nx_inet_naive_probe.nxnx_browse_text_test.nxnx_library_search_test.nxnx_research_fetch_test.nxnx_research_resilience_test.nx
structs
| none |
consts
| 32 | const NX_MAGIC_4096: i64 = 4096 |
| 36 | const NX_BR_OK: i64 = 0 |
| 37 | const NX_BR_SOCKET_FAIL: i64 = 1 |
| 38 | const NX_BR_CONNECT_FAIL: i64 = 2 |
| 39 | const NX_BR_SEND_FAIL: i64 = 3 |
| 40 | const NX_BR_RECV_FAIL: i64 = 4 |
| 41 | const NX_BR_PARSE_FAIL: i64 = 5 |
| 42 | const NX_BR_STATUS_FAIL: i64 = 6 |
| 43 | const NX_BR_OVERFLOW: i64 = 7 |
functions
| 47 | func br_addr_ipv4(out: *u8, a: i64, b: i64, c: i64, d: i64, port: i64) -> i64 |
| 57 | func br_drain(fd: i64, buf: *u8, cap: i64) -> i64 |
| 72 | func br_build_get( called by 1: br_fetch_raw |
| 121 | func br_fetch_raw( called by 1: nx_browse_text calls 7: sys_socketnx_connect_boundedsys_closesys_mmapbr_build_getsys_write+1 |
| 148 | func br_render_response( |
| 172 | func nx_browse_text( |