nx_url.nx
buildroot/runtime/nx_url.nx
about
nx_url.nx -- minimal URL parser (RFC 3986 subset).
Parses "scheme://host[:port]/path?query#fragment" into its
component spans within the original buffer. No allocation;
each component is an offset+length pair pointing into the
original input string.
Used by:
- HTTP client (host/port for connect, path for GET line)
- Sovereign Gemini browser (the next-app-after-chat use case)
- Service discovery URL canonicalization
Out of scope:
- Percent-decoding
- IPv6 address brackets ([fe80::1])
- userinfo (user:pass@host)
- International domain names (Punycode)
dependencies 2 imports · 13 importers
diagram shows first 10 each side; +0 more imports, +3 more importers in the complete lists below.
imports: syscalls.nxnx_runtime.nx
imported by: _dlr_probe.nxnx_https_client.nxnx_https_get.nxnx_https_get_spoof.nxnx_https_ka_probe.nxnx_https_url_for_fetch.nxnx_https_url_for_fetch_test.nxnx_porkbun_ping_probe.nxnx_research_ka.nxnx_tls12_handshake_gate.nxnx_tls12_probe_test.nxnx_url_parse_test.nxnx_video_get.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 35 | struct NxUrl |
consts
| 32 | const NX_MAGIC_65535: i64 = 65535 |
| 33 | const NX_MAGIC_8080: i64 = 8080 |
| 44 | const NX_URL_BYTES: i64 = 88 |
| 47 | const NX_URL_ERR_NO_SCHEME: i64 = -1 |
| 48 | const NX_URL_ERR_NO_HOST: i64 = -2 |
| 49 | const NX_URL_ERR_BAD_PORT: i64 = -3 |
functions
| 54 | func nx_url_new() -> *NxUrl |
| 68 | func nx_url_parse(s: *u8, out: *NxUrl) -> i64 |
| 200 | func main() -> i64 |