code wiki / (root) / nx_search_crawl_server.nx

nx_search_crawl_server.nx

buildroot/runtime/nx_search_crawl_server.nx

10015 B224 linesdepth 6pulls 22 transitivereach 0 importersview sourcekind servicetopic search
docsdependenciesstructsconstsfunctions

about

nx_search_crawl_server.nx -- LIVE search site over CRAWLED content. module: nishi-core.search.crawl_server depends: nx_http_server, nx_http_client, nx_html_to_text, nx_simhash, nx_rank_fused, fx, nx_str capability: APP_RUNNABLE (DAEMON) The integrated end-state: at startup the daemon CRAWLS a seed list over our own HTTP client (fetch -> extract text -> content-dedup -> index), then serves a live search site that ranks the SCRAPED corpus per query (nx_rank_fused: tier + BM25 content via RRF). Everything is surfaced by relevance -- no category censorship, no provenance weighting (operator decision 2026-05-29: maximal coverage). Demonstrated on loopback against nx_mock_web; in the networked env the seeds are real URLs over DNS/TLS/HTTP.

dependencies 7 imports · 0 importers

fx.nx nx_str.nx nx_http_server.nx nx_http_client.nx nx_html_to_text.nx nx_simhash.nx nx_rank_fused.nx nx_search_crawl_server.nx

imports: fx.nxnx_str.nxnx_http_server.nxnx_http_client.nxnx_html_to_text.nxnx_simhash.nxnx_rank_fused.nx

imported by: nobody (leaf or entry point)

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

main nx_http_client_sockaddr_ip nx_str_len nx_http_client_get sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap sys_poll sys_close sys_mmap ↻ 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 nx_cc_put nx_codec_caps_accept_encod cc_encoding_have nx_cc_put ↻ cc_encoding_name nx_cc_put ↻ sys_write _drain sys_read nx_body_off nx_html_to_text nx_html_to_text_x h2t_state_new sys_mmap ↻ sys_mmap ↻ h2t_scan_tag h2t_skip_to_gt h2t_scan_name h2t_is_name h2t_is_block_tag

structs

none

consts

24const NX_SCS_PORT: i64 = 8790
25const NX_SCS_CRAWL_PORT: i64 = 8088 // the mock-web (or any seed host)

functions

27func bputc(buf: *u8, pos: *i64, cap: i64, c: i64) -> i64 { if pos[0] < cap { buf[pos[0]] = c; pos[0] = pos[0] + 1 } return 0 }
called by 1: bput
28func bput(buf: *u8, pos: *i64, cap: i64, s: *u8) -> i64 { let n: i64 = nx_str_len(s); var i: i64 = 0; while i < n { bputc(buf, pos, cap, s[i] as i64); i = i + 1 } return 0 }
called by 1: main calls 2: nx_str_lenbputc
30func nx_body_off(resp: *u8, n: i64) -> i64
called by 1: main
40func nx_extract_title(html: *u8, n: i64, out: *u8, outcap: i64) -> i64
called by 1: main
65func nx_extract_query(req: *u8, path_off: i64, path_len: i64, out: *u8, out_cap: i64) -> i64
92func nx_split_terms(qbuf: *u8, qlen: i64, tp: **u8, tl: *i64, max: i64) -> i64
107func main() -> i64