code wiki / _hdl_build / _locator_authored.nx
_locator_authored.nx
buildroot/runtime/_hdl_build/_locator_authored.nx
about
AUTHORED BY THE NISHI BUILDER (locator template) -- content-addressed cross-device locator, bits-up
dependencies 1 imports · 0 importers
imports: nx_sha256.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 3 | func locator_make(text: *u8, n: i64, offset: i64, loc: *u8) -> i64 { sha256_digest(text, n, loc); let p: *i64=((loc as i64)+32) as *i64; p[0]=offset; return 0 } |
| 4 | func locator_resolve(text: *u8, n: i64, loc: *u8) -> i64 { let id: *u8=sys_mmap(32); sha256_digest(text, n, id); var i: i64=0; while i<32 { if id[i]!=loc[i] { return 0-1 } i=i+1 } let p: *i64=((loc as i64)+32) as *i64; return p[0] } |
| 5 | func main() -> i64 |