code wiki / _hdl_build / nx_struct_extract.nx

nx_struct_extract.nx

buildroot/runtime/_hdl_build/nx_struct_extract.nx

10161 B185 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_struct_extract.nx -- STRUCTURED-DATA extractor (grow-capabilities 2026-07-05): mine the high-quality metadata modern sites embed for SEO/rich-results -- OpenGraph, Twitter-card, <meta name=description>, <title>, and JSON-LD -- straight from the HTML. MEASURED motivation (SPA-shell probe): BBC/NYT ship og:+jsonld+twitter in the shell; x.com ships og. This yields a CLEAN title + description (snippet) + type + site even when the visible <body> is JS-rendered, and IS the knowledge-card source the SERP lacked. It is a PARSER, not a JS VM -- it does NOT execute client-only SPAs (reddit-class, no embedded data = still need the browser-JS arc). Precedence: og > twitter > JSON-LD > <meta description>/<title>. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_struct_extract.nx nx_bulk_index.nx nx_entity_card.nx nx_struct_extract_gate.nx nx_url_index.nx

imports: nx_syscalls.nx

imported by: nx_bulk_index.nxnx_entity_card.nxnx_struct_extract_gate.nxnx_url_index.nx

structs

none

consts

9const K_MAGIC_1000000: i64 = 1000000

functions

11func se_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 2: se_ci_atse_meta
13func se_ci_at(hay: *u8, off: i64, hlen: i64, b: *u8, blen: i64) -> i64
21func se_attr(html: *u8, ts: i64, te: i64, name: *u8, nlen: i64, out: *u8, cap: i64) -> i64
called by 1: se_meta calls 1: se_ci_at
65func se_meta(html: *u8, hlen: i64, keyattr: *u8, kalen: i64, key: *u8, klen: i64, out: *u8, cap: i64) -> i64
101func se_title(html: *u8, hlen: i64, out: *u8, cap: i64) -> i64
called by 1: nx_struct_extract calls 1: se_ci_at
123func se_jsonld(html: *u8, hlen: i64, field: *u8, flen: i64, out: *u8, cap: i64) -> i64
called by 2: mainnx_struct_extract calls 1: se_ci_at
161func nx_struct_extract(html: *u8, hlen: i64,