code wiki / (root) / nx_lib_fetch.nx

nx_lib_fetch.nx

buildroot/runtime/nx_lib_fetch.nx

4070 B90 linesdepth 19pulls 127 transitivereach 11 importersview sourcekind librarytopic lib
docsdependenciesstructsconstsfunctions

about

nx_lib_fetch.nx -- sovereign HTTPS fetch for the library ingest (retires httpx). WIRES the team's TLS-1.3 stack exactly as nx_semantic_research_fetch: load a CA TrustStore, then per URL: parse -> DNS+TCP connect -> TLS-1.3 handshake (cert-verified) -> GET -> response bytes. No OpenSSL, no python. Ready the moment the network is up; + nx_lib_parse -> nx_lib_store completes the fetch->parse->store ingest. license_tier: ORIGINAL | genealogy_id: nishi_library_sovereign_fetch_2026_07_01

dependencies 10 imports · 9 importers

nx_syscalls.nx nx_csprng.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get_complete.nx nx_http_response_parse.nx nx_lib_fetch.nx nx_lib_fetch_ingest.nx nx_lib_fetch_probe.nx nx_lib_openalex_probe.nx nx_lib_pdf.nx nx_lib_pmc_fetch.nx nx_lib_pmc_pow.nx nx_lib_pow_decomp.nx nx_lib_verify_probe.nx nx_route_test.nx

imports: nx_syscalls.nxnx_csprng.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_http_response_parse.nx

imported by: nx_lib_fetch_ingest.nxnx_lib_fetch_probe.nxnx_lib_openalex_probe.nxnx_lib_pdf.nxnx_lib_pmc_fetch.nxnx_lib_pmc_pow.nxnx_lib_pow_decomp.nxnx_lib_verify_probe.nxnx_route_test.nx

structs

none

consts

19const NX_LIB_CERTDATA: *u8 = "data/mozilla_certdata.txt\x00" // repo-shipped Mozilla NSS CA bundle (sovereign asset, no /tmp staging)

functions

22func nx_lib_fetch_store() -> *TrustStore
30func nx_lib_fetch(store: *TrustStore, url_str: *u8, out_buf: *u8, out_cap: i64) -> i64
84func nx_lib_fetch_status(store: *TrustStore, url_str: *u8, out_buf: *u8, out_cap: i64) -> i64