nx_lib_httpd.nx
buildroot/runtime/nx_lib_httpd.nx
about
nx_lib_httpd.nx -- sovereign HTTP DAEMON for the nishi-library read API.
Serves the READ PATH over the wire straight from nx_lib_store, RETIRING the
Python serve.py endpoints + its SQLite. No python, no 3rd-party HTTP stack,
no shell: raw sovereign sockets (nx_syscalls, pulled via nx_lib_serve -- so
we do NOT import nx_syscalls_x86_64.nx = no sys_* double-emit) + the pure
router nx_lib_http.
GET /api/works -> JSON array of work_hks
GET /api/work/<hk> -> JSON work record (200) or 404
license_tier: ORIGINAL | genealogy_id: nishi_library_sovereign_httpd_2026_06_30
dependencies 1 imports · 0 importers
imports: nx_lib_http.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
| 12 | const LHD_AF_INET: i64 = 2 |
| 13 | const LHD_SOCK_STREAM: i64 = 1 |
| 14 | const LHD_SOL_SOCKET: i64 = 1 |
| 15 | const LHD_SO_REUSEADDR: i64 = 2 |
| 16 | const LHD_PORT: i64 = 8095 |
| 17 | const LHD_BACKLOG: i64 = 128 |
| 18 | const LHD_BUDGET: i64 = 1000000 // JPL-rule-2 bounded accept loop |
functions
| 20 | func lhd_write_all(fd: i64, buf: *u8, n: i64) -> i64 called by 1: lhd_handle |
| 33 | func lhd_handle(cfd: i64) -> i64 |
| 76 | func lhd_sockaddr(addr: *u8, port: i64) -> i64 called by 1: main |
| 86 | func main() -> i64 |