nx_crawl_bfs.nx
buildroot/runtime/nx_crawl_bfs.nx
about
nx_crawl_bfs.nx -- autonomous link-following crawler (frontier BFS).
module: nishi-core.search.crawl_bfs
depends: nx_http_client, nx_html_to_text, nx_simhash, nx_bm25,
nx_crawl_frontier, fx, nx_str
capability: APP_RUNNABLE
The real crawler: from ONE seed it FETCHES, extracts outbound links
(nx_crawl_frontier), enqueues the unseen ones (visited-set guards re-crawl),
and repeats -- discovering the site graph, not a hardcoded list. Each page is
content-deduped (nx_simhash) and indexed (nx_search_inverted). Proven on the
loopback mock-web: seed "/" -> discovers + crawls /wiki, /thothub, /fan.
dependencies 7 imports · 0 importers
imports: fx.nxnx_str.nxnx_http_client.nxnx_html_to_text.nxnx_simhash.nxnx_bm25.nxnx_crawl_frontier.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const K_MAGIC_8088: i64 = 8088 |
| 22 | const K_MAGIC_16384: i64 = 16384 |
| 23 | const K_MAGIC_8192: i64 = 8192 |
functions
| 25 | func nx_putc(c: i64) -> i64 { let b: *u8 = sys_mmap(1); b[0] = c; sys_write(1, b, 1); return 0 } |
| 26 | func nx_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 27 | func nx_put_i64(n: i64) -> i64 |
| 34 | func nx_body_off(resp: *u8, n: i64) -> i64 called by 1: main |
| 41 | func nx_url_path(url: *u8, out: *u8, outcap: i64) -> i64 |
| 61 | func nx_crawl_search(urls: **u8, texts: **u8, tlens: *i64, n: i64, q: *u8) -> i64 |
| 72 | func main() -> i64 |