code wiki / _hdl_build / nx_media_record.nx

nx_media_record.nx

buildroot/runtime/_hdl_build/nx_media_record.nx

3721 B75 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tooltopic media
docsdependenciesstructsconstsfunctions

about

nx_media_record.nx -- MLIB-003 v1 (CALLOUT-012). The uniform MEDIA RECORD = a PROFILE of the X-CAP-001 meta schema (nx_meta_schema), made CONTENT-ADDRESSED via the canonical CID (nx_canon_cid). Composes proven organs (no rebuild, no parallel substrate): record (modality/cid/origin/gen_modality/source_model/consent/license/attr.codec/dims/phash) -> ms_valid (consent hard line) + ms_roundtrip (lossless, X-CAP-001) -> canon_encode + cid_of -> content fingerprint "nxc1-<64hex>" = the store key lib:<fp>. The fingerprint is DETERMINISTIC (same record -> same fp = dedup/provenance) and CONTENT- SENSITIVE (one byte changes -> different fp = integrity/tamper). Persisting+versioning the record on the seg store (nx_seg_store, time-travel PROVEN by nx_infomgmt_gate) = the wiring slice MLIB-003b. Self-validating gate (MEDIARECGATE) for nx_reconcile. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_meta_schema.nx nx_canon_cid.nx nx_media_record.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_meta_schema.nxnx_canon_cid.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap ms_set ms_valid ms_get ms_streq ms_streq ↻ ms_roundtrip sys_mmap ↻ ms_emit ms_app ms_parse ms_scan ms_bufeq mr_fingerprint sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word sha256_final blk_set_byte ↻ sha256_compress ↻ cid_from_digest sys_munmap ↻

structs

none

consts

15const K_MAGIC_16384: i64 = 16384

functions

17func mr_puts(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 calls 1: sys_write
22func mr_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
25func mr_fingerprint(keys: *i64, vals: *i64, n: i64, fpout: *u8) -> i64
called by 1: main calls 3: sys_mmapcanon_encodecid_of
31func main() -> i64