code wiki / _hdl_build / nx_cms_store.nx
nx_cms_store.nx
buildroot/runtime/_hdl_build/nx_cms_store.nx
about
nx_cms_store.nx -- CMS ladder step 10a: the per-site CONTENT STORE (content as DATA, the
WordPress content/theme split, sovereign). Record format, line-based and auditable by eye:
@key\n
value bytes (may span lines)\n
@nextkey\n ...
A value runs from after its key line to the byte before the next '@'-at-line-start (its trailing
newline excluded). Keys ending in _html hold SANITIZED rich text (nx_html_sanitize on write);
everything else is plain text, escaped at render. Writes are ATOMIC (temp + sys_renameat) and
ADDITIVE (rule 13): the prior store is kept at <path>.prev before every swap = one-deep revision,
rollback = swap back. license_tier: ORIGINAL
dependencies 1 imports · 22 importers
diagram shows first 10 each side; +0 more imports, +12 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nx_cms_analytics_gate.nxnx_cms_api.nxnx_cms_api_gate.nxnx_cms_argon_gate.nxnx_cms_blocks_gate.nxnx_cms_booking.nxnx_cms_comments_gate.nxnx_cms_draft_gate.nxnx_cms_forms_gate.nxnx_cms_gate.nxnx_cms_i18n.nxnx_cms_i18n_gate.nxnx_cms_migrate.nxnx_cms_migrate_gate.nxnx_cms_multisite_gate.nxnx_cms_render.nxnx_cms_schedule_gate.nxnx_cms_seo_gate.nxnx_cms_snapshot_gate.nxnx_cms_tls_gate.nxnx_cms_webdev_gate.nxnx_sitegen_game.nx
structs
| none |
consts
| 12 | const K_MAGIC_65536: i64 = 65536 |
functions
| 14 | func cst_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 17 | func cst_find(buf: *u8, n: i64, key: *u8, vs: *i64) -> i64 |
| 60 | func cst_get(buf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64 called by 15: ca_editor_pageca_seo_getca_seo_headca_analytics_hitca_blocks_htmlca_blocks_editor+9 calls 2: sys_mmapcst_find |
| 72 | func cst_set(buf: *u8, n: i64, key: *u8, val: *u8, vl: i64, out: *u8, cap: i64) -> i64 called by 8: ca_render_publishca_analytics_hitca_render_draftca_save_fieldmainmain+2 calls 3: sys_mmapcst_findcst_slen |
| 102 | func cst_read(path: *u8, out: *u8, cap: i64) -> i64 |
| 117 | func cst_copy(src: *u8, dst: *u8) -> i64 |
| 134 | func cst_write_atomic(path: *u8, buf: *u8, n: i64) -> i64 called by 4: ca_render_publishca_analytics_hitmainmain calls 7: cst_slensys_mmapcst_copysys_openat_wrsys_writesys_close+1 |
| 152 | func cst_rollback(path: *u8) -> i64 |