nx_pe_compile_win_httpd.nx
buildroot/runtime/nx_pe_compile_win_httpd.nx
about
nx_pe_compile_win_httpd.nx -- W-NET-1/2/3: a sovereign Nishi-native Windows HTTP server.
nxc2-compiled NishiLang -> native PE that listens on a TCP port via raw Winsock and serves HTTP.
No Docker, no VM, no WSL, no libc: kernel32 { ExitProcess } + ws2_32 { WSAStartup, socket, bind,
listen, accept, send, closesocket }. The keystone-linker resolves each socket shim to a Winsock
thunk (SysV->MS-x64 + sockaddr/htons built in-thunk). The 1:1 Elder-UI-on-:5173 migration vehicle.
Tolerant: only redirects shims that the source actually defines (so a socket+bind+listen probe and
the full serve loop both build from the same organ). lineage_id: substrate_pe_compile_win_httpd_v1
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnxasm_x86.nxnx_pe_writer.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 HD_CODE_CAP: i64 = 1048576 |
| 13 | const HD_FILE_SIZE: i64 = 0x1400 // headers(0x200)+.text(0x1000)+.idata(0x200) |
| 14 | const HD_STUB_LEN: i64 = 18 |
| 15 | const HD_TEXT_CAP: i64 = 0x1000 |
| 16 | const HD_RVA_TEXT: i64 = 0x1000 |
| 17 | const HD_RVA_IDATA: i64 = 0x2000 |
| 18 | const HD_FOFF_TEXT: i64 = 0x200 |
| 19 | const HD_FOFF_IDATA:i64 = 0x1200 |
| 21 | const HD_IAT_EXIT: i64 = 0x2094 |
| 22 | const HD_IAT_WSA: i64 = 0x20A4 |
| 23 | const HD_IAT_SOCK: i64 = 0x20AC |
| 24 | const HD_IAT_BIND: i64 = 0x20B4 |
| 25 | const HD_IAT_LISTEN:i64 = 0x20BC |
| 26 | const HD_IAT_ACCEPT:i64 = 0x20C4 |
| 27 | const HD_IAT_SEND: i64 = 0x20CC |
| 28 | const HD_IAT_CLOSE: i64 = 0x20D4 |
| 29 | const HD_IAT_RECV: i64 = 0x20DC |
| 32 | const HD_L_WSA: i64 = 31 |
| 33 | const HD_L_SOCK: i64 = 28 |
| 34 | const HD_L_BIND: i64 = 65 |
| 35 | const HD_L_LISTEN: i64 = 23 |
| 36 | const HD_L_ACCEPT: i64 = 23 |
| 37 | const HD_L_SEND: i64 = 27 |
| 38 | const HD_L_CLOSE: i64 = 18 |
| 39 | const HD_L_RECV: i64 = 38 |
functions
| 41 | func hd_lbloff(src: *u8, n: i64, out: *u8, lab_off: *i64, lab_len: *i64, lab_addr: *i64, lab_sec: *i64, n_lab: i64, nm: *u8) -> i64 |
| 51 | func hd_assemble(src: *u8, n: i64, out: *u8, out_cap: i64, off: *i64) -> i64 |
| 88 | func hd_redirect(buf: *u8, shim_off: i64, thunk_off: i64) -> i64 |
| 97 | func hd_emit_pe(buf: *u8, code: *u8, code_len: i64, off: *i64) -> i64 |
| 271 | func main() -> i64 |