code wiki / _hdl_build / nx_builder_authors_doc_cas.nx
nx_builder_authors_doc_cas.nx source
↩ module page · 12 lines · 650 B
1// nx_builder_authors_doc_cas.nx -- the BUILDER authors the Nishi reader format's content-addressed doc ID.
2import "nx_module_author.nx"
3import "nx_syscalls.nx"
4func _b(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
5func main() -> i64 {
6 _b("BUILDER authors content-addressed doc ID (sha256 = the Nishi reader format's stable identity)\n" as *u8)
7 let fd: i64 = sys_openat_wr("runtime/_hdl_build/_doc_cas_authored.nx" as *u8, 0x1a4)
8 ma_emit_doc_cas(fd, "doc_cas_id" as *u8)
9 sys_close(fd)
10 _b(" -> _doc_cas_authored.nx authored; Engineer verifies next\n" as *u8)
11 sys_exit(0); return 0
12}