The desktop soul (neuron/dist) compiles against the v1.0.0-20260501 release
runtime. After #66 landed the engram natives (tokenized/ranked search,
engram_prune_telemetry) and #79 the durable truncation fix into this runtime,
two gaps remained before it could cross-compile the Windows brain:
1. Windows OS boundary: the release runtime had no Win32 path. Ported the same
_WIN32-guarded shim the mainline runtime carries (#69): #ifdef _WIN32 ->
el_platform_win.h (winsock/dlsym/popen + WSAStartup ctor), SOCKET fd guards
and el_closesocket() at every socket site, CreateProcessA for exec_bg, the
tm_zone/mingw guard, an el_setsockopt optval wrapper (GCC14), and curl-less
libcurl stubs. Every change is _WIN32/HAVE_CURL-gated — the POSIX build is
byte-identical (gcc -fsyntax-only clean; native behaviour unchanged).
2. Header exports: the release el_runtime.h omitted symbols the soul dist calls
that are defined in this runtime's .c — the http_handler_fn/http_handler4_fn
typedefs and el_arena_push/pop, engram_prune_telemetry, engram_get_node_by_label.
Declaration-only, POSIX-neutral; fixes implicit-declaration/unknown-type
errors under the C11 mingw build.
Result: x86_64-w64-mingw32-gcc compiles el_runtime.c + all 48 soul modules
clean; POSIX gcc -fsyntax-only clean. This is the Windows-port PR the runtime
needed on main (the release-runtime counterpart to #69), landed via stage.
engram_load_merge was added to el-compiler/runtime in 35c1897 but never
ported to the released runtime used by Engram and the soul daemon.
awareness.el calls engram_load_merge in its sync refresh cycle; without
this function in lang/releases/v1.0.0-20260501/el_runtime.c the soul
daemon fails to compile.
Also adds header declarations for engram_wm_count, engram_wm_avg_weight,
engram_wm_top_json, and engram_load_merge — all four were added as
implementations (da116b2 / 35c1897) but their prototypes were missing from
el_runtime.h, causing implicit-function-declaration warnings and potential
ABI breakage on stricter compilers.
Identified during self-review 2026-06-30.