code wiki / _hdl_build / nx_ads.nx

nx_ads.nx

buildroot/runtime/_hdl_build/nx_ads.nx

5428 B111 linesdepth 4pulls 5 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_ads.nx -- LIB: SOVEREIGN ADS (operator: "i also want to have ads a part of all this"). The Nishi take on advertising that fits the doctrine (privacy-first, data treated as valuable not stolen): FIRST-PARTY, CONTEXTUAL, NON-TRACKING. An ad is selected purely by the CONTEXT of the page being shown (its topic tag) -- NEVER by a profile/history of the viewer (ads_pick takes a context, NOT a user id, by construction). Rendered server-side into the sovereign page: clearly labelled "Sponsored", zero third-party JS, zero tracking pixels, no external script. Sovereign seg-store (knowledge/store/ads-*, NO TSV). license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_food_science.nx nx_seg_store.nx nx_syscalls.nx nx_ads.nx nx_swap.nx nx_swap_gate.nx

imports: nx_food_science.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_swap.nxnx_swap_gate.nx

structs

none

consts

none

functions

11func ads_put(prefix: *u8, key: *u8, val: *u8) -> i64
21func ads_ad_key(aid: *u8, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "ads:ad:" as *u8); o = as_append(out, o, aid); out[o] = 0 as u8; return o }
called by 2: ads_addads_field calls 1: as_append
22func ads_tag_key(tag: *u8, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "ads:tag:" as *u8); o = as_append(out, o, tag); out[o] = 0 as u8; return o }
called by 2: ads_addads_pick calls 1: as_append
25func ads_add(prefix: *u8, aid: *u8, headline: *u8, body: *u8, advertiser: *u8, context: *u8) -> i64
63func ads_field(prefix: *u8, aid: *u8, f: i64, out: *u8) -> i64
74func ads_pick(prefix: *u8, context: *u8, out_aid: *u8) -> i64
96func ads_render_slot(prefix: *u8, context: *u8, out: *u8, off: i64) -> i64