code wiki / _hdl_build / nx_domain_forge.nx
nx_domain_forge.nx
buildroot/runtime/_hdl_build/nx_domain_forge.nx
about
nx_domain_forge.nx -- APPEND-DRIVEN, DATA-DRIVEN domain/site AUTO-BUILDER (operator 2026-06-29: "we should be
able to append new domains and sites and have the site builders EMIT them using the auto-building capabilities
to put together PIECES like LEGOS"). Reads a domain REGISTRY (domains.conf, one row per domain) and for EACH
domain COMPOSES the site from reusable Lego pieces (the nx_hub_template block emitter: header/blog/video/
calendar/friends) AND emits the standalone-domain wiring: the docroot index.html + the sites.conf host->docroot
VHOST line + a per-domain CERT-REGISTRY row (host -> wildcard chain/key). APPEND A DOMAIN = add ONE registry row
+ re-run (IDEMPOTENT: the emitted configs are rewritten from the registry every run -> the registry is the SSOT,
no hand-editing). Composes nx_hub_template. domains.conf row (space-delim): <domain> <docroot_dir> <hub_config>.
license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_hub_template.nxnx_itoa_lib.nx
imported by: nx_domain_forge_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const K_MAGIC_1048576: i64 = 1048576 |
| 13 | const K_MAGIC_2048: i64 = 2048 |
| 14 | const K_MAGIC_4096: i64 = 4096 |
| 15 | const K_MAGIC_1024: i64 = 1024 |
functions
| 17 | func df_cat(dst: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i];o=o+1;i=i+1} return o } called by 1: df_emit |
| 18 | func df_catb(dst: *u8, o: i64, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n {dst[o]=b[i];o=o+1;i=i+1} return o } called by 1: df_emit |
| 20 | func df_eol(b: *u8, n: i64, st: i64) -> i64 called by 1: df_forge |
| 25 | func df_split(b: *u8, ls: i64, le: i64, offs: *i64, lens: *i64, maxf: i64) -> i64 called by 1: df_forge |
| 38 | func df_copyz(dst: *u8, src: *u8, off: i64, len: i64) -> i64 { var i: i64=0; while i<len { dst[i]=src[off+i]; i=i+1 } dst[len]=0 as u8; return len } called by 1: df_forge |
| 41 | func df_emit(domain: *u8, dl: i64, docroot: *u8, drl: i64, hubcfg: *u8, scfd: i64, crfd: i64) -> i64 |
| 64 | func df_forge(reg: *u8, sitesconf: *u8, certreg: *u8) -> i64 |
| 98 | func df_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 103 | func df_wn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 105 | func main(argc: i64, argv: *i64) -> i64 |