code wiki / _hdl_build / nx_translate_daemon.nx

nx_translate_daemon.nx

buildroot/runtime/_hdl_build/nx_translate_daemon.nx

6558 B159 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind service
docsdependenciesstructsconstsfunctions

about

nx_translate_daemon.nx -- the SOVEREIGN live /translate service for nishifamily.com/video, now on the DATA-DRIVEN RU<->EN engine (nx_xlate_mt) -- replaces the old toy EN->ES (sea/tea/go) demo. Loopback :8447, plain HTTP behind the edge; supervised by the existing hostctl guard (nx_hostctl.nx HC_XLATE :8447) so it CANNOT affect the video/signaling path. GET /translate?text=<urlenc>[&dir=ru2en|en2ru] -> text/plain (CORS-open). Direction auto-detected from Cyrillic when dir= absent. Lexicon + morphology load from knowledge/xlate/ at startup. Any non-text GET (e.g. a health probe) -> 200 "?" so the guard sees it alive. genealogy_id: sovereign_data_driven_ruen_mt_v1 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_http_server.nx nx_xlate_mt.nx nx_syscalls.nx nx_translate_daemon.nx

imports: nx_http_server.nxnx_xlate_mt.nxnx_syscalls.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 sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close xl_build sys_mmap ↻ xl_field xl_norm_phrase xl_is_tok xl_putb xl_norm_tok xl_putb ↻ sys_munmap nx_http_server_addr_loopba nx_http_server_make_sockad nx_http_server_listen sys_ignore_sigpipe sys_mmap ↻ sys_socket sys_mmap ↻ sys_setsockopt sys_bind sys_close ↻ sys_listen sys_write nx_http_server_accept_one sys_accept nx_http_server_read_reques sys_read ↻ nx_http_parse_request td_param td_hex td_autodir td_dirparam xl_translate sys_mmap ↻

structs

none

consts

11const TD_MAGIC_8192: i64 = 8192
12const TD_MAGIC_4096: i64 = 4096
13const TD_MAGIC_16384: i64 = 16384
15const TD_PORT: i64 = 8447
16const TD_HDR1: *u8 = "HTTP/1.1 200 OK\r\nContent-Type: text/plain; charset=utf-8\r\nAccess-Control-Allow-Origin: *\r\nContent-Length: " as *u8
17const TD_HDR2: *u8 = "\r\nConnection: close\r\n\r\n" as *u8

functions

19func td_puts(buf: *u8, off: i64, s: *u8) -> i64
called by 1: main
25func td_wdec(buf: *u8, off: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_munmap
36func td_hex(c: i64) -> i64
called by 1: td_param
43func td_param(req: *u8, len: i64, out: *u8) -> i64
called by 1: main calls 1: td_hex
79func td_dirparam(req: *u8, len: i64) -> i64
called by 1: main
90func td_autodir(txt: *u8, n: i64) -> i64
called by 1: main
95func main() -> i64