code wiki / (root) / nx_help.nx

nx_help.nx

buildroot/runtime/nx_help.nx

8120 B252 linesdepth 4pulls 7 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_help.nx -- substrate-native S-class help / search engine. User mandate 2026-05-13: 'this should allow nishilang to have its own native search engine of itself a true s class help'. Single entry point that unifies search across: - nx_jargon terminology + cross-discipline aliases - nx_qed_db theorem entries with verify_status - nx_question_genealogy why-chains - (queued) theorem cards from THEOREM_CATALOG Sealed result kinds; tier-appropriate answers; no external network; no AI hallucination. Every result cites a primary source from nishi-library/seeds/formal_math/. genealogy_id: knuth_taocp + dewey_decimal + library_science lineage_id: unified_search + faceted_query axioms: NX_AX_LOGIC_IDENTITY (a result IS its content)

dependencies 5 imports · 1 importers

syscalls.nx nx_axioms.nx nx_jargon.nx nx_qed_db.nx nx_question_genealogy.nx nx_help.nx nx_help_test.nx

imports: syscalls.nxnx_axioms.nxnx_jargon.nxnx_qed_db.nxnx_question_genealogy.nx

imported by: nx_help_test.nx

structs

42struct HelpResult

consts

34const NX_HELP_KIND_NONE: i64 = 0
35const NX_HELP_KIND_JARGON_DEFINITION: i64 = 1
36const NX_HELP_KIND_THEOREM_CARD: i64 = 2
37const NX_HELP_KIND_QUESTION_NARRATIVE: i64 = 3
38const NX_HELP_KIND_AMBIGUOUS: i64 = 4 // multiple matches
51const NX_HELP_RESULT_BYTES: i64 = 48

functions

53func nx_help_result_alloc() -> *HelpResult
called by 1: main
73func nx_help_str_starts_with(haystack: *u8, needle: *u8) -> i64
called by 1: nx_help_search_qg
85func nx_help_search_jargon(jd: *JargonDb, query: *u8,
99func nx_help_search_qed(qd: *QedDb, query: *u8,
121func nx_help_search_qg(qt: *QuestionTree, query: *u8,
139func nx_help_query(jd: *JargonDb, qd: *QedDb, qt: *QuestionTree,
172func hp_putc(fd: i64, c: i64) -> i64
called by 1: hp_i64
179func hp_str(fd: i64, s: *u8, n: i64) -> i64
called by 1: nx_help_emit_result
184func hp_strz(fd: i64, s: *u8) -> i64
called by 1: nx_help_emit_result
191func hp_i64(fd: i64, n: i64) -> i64
215func nx_help_emit_result(fd: i64, r: *HelpResult, query: *u8) -> i64
called by 1: main calls 3: hp_strhp_strzhp_i64