code wiki / (root) / nx_forge_ctx.nx

nx_forge_ctx.nx

buildroot/runtime/nx_forge_ctx.nx

17916 B527 linesdepth 3pulls 3 transitivereach 33 importersview sourcekind librarytopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_ctx.nx -- FORGE F2: the context-pack EMITTER core (pure lib, no main; CLI = nx_forge_ctx_emit, gate = nx_forge_ctx_gate). Emits the NishiLang coding pack from SOURCES instead of a hand seed: (1) the curated rules corpus knowledge/forge/pack_rules_v1.txt copied verbatim -- FAIL-CLOSED if any line begins UNVERIFIED; (2) the stdlib API section EXTRACTED LIVE from runtime/nx_lib_std.nx (every `func std_` signature line) so a stale signature is impossible by construction; (3) the exemplar EMBEDDED verbatim from runtime/nx_fbench_probe.nx (lane-GREEN, re-verified before each pack bless). fc_check_sigs is the gate's cross-checker: every emitted signature must exist verbatim in the live lib (catches planted/stale rows). license_tier: ORIGINAL

dependencies 2 imports · 7 importers

nx_syscalls.nx nx_lib_std.nx nx_forge_ctx.nx nx_coder_fidelity_gate.nx nx_forge.nx nx_forge_ctx_emit.nx nx_forge_ctx_gate.nx nx_forge_local_gen.nx nx_mcp_coverage.nx nx_pack_rules_vet_gate.nx

imports: nx_syscalls.nxnx_lib_std.nx

imported by: nx_coder_fidelity_gate.nxnx_forge.nxnx_forge_ctx_emit.nxnx_forge_ctx_gate.nxnx_forge_local_gen.nxnx_mcp_coverage.nxnx_pack_rules_vet_gate.nx

structs

none

consts

12const K_MAGIC_32768: i64 = 32768
13const K_MAGIC_65536: i64 = 65536

functions

15func fc_read(path: *u8, buf: *u8, cap: i64) -> i64
39func fc_wb(fd: i64, p: *u8, n: i64) -> i64
54func fc_ws(fd: i64, s: *u8) -> i64
61func fc_has_unverified(buf: *u8, n: i64) -> i64
called by 2: fc_emit_minifc_emit
92func fc_contains(hay: *u8, hn: i64, nd: *u8, nn: i64) -> i64
114func fc_line_is_sig(buf: *u8, ls: i64, le: i64) -> i64
131func fc_line_cend(buf: *u8, ls: i64, le: i64) -> i64
142func fc_extract_sigs(buf: *u8, n: i64, fd: i64) -> i64
173func fc_check_sigs(pack: *u8, pn: i64, lib: *u8, ln: i64) -> i64
201func fc_fstart(buf: *u8, ls: i64, le: i64, n: i64) -> i64
220func fc_fend(buf: *u8, fs: i64, le: i64) -> i64
232func fc_render_rules(buf: *u8, n: i64, fd: i64) -> i64
called by 1: fc_emit calls 4: fc_fstartfc_fendfc_wsfc_wb
317func fc_render_rules_brief(buf: *u8, n: i64, fd: i64) -> i64
373func fc_emit_mini(rules_path: *u8, vet_path: *u8, lib_path: *u8, ex_path: *u8, out_path: *u8, budget: i64) -> i64
453func fc_emit(rules_path: *u8, vet_path: *u8, lib_path: *u8, ex_path: *u8, out_path: *u8) -> i64