build: optional static musl + mimalloc target (-Duse_mimalloc) master
groundwork for a fully static `FROM scratch` zlay. all gated behind -Duse_mimalloc=true; the default glibc production build is byte-for-byte unchanged. key finding: the old "musl breaks RocksDB" rule was a zig 0.15 codegen issue and no longer reproduces at build time on 0.16. RocksDB compiles and links clean for x86_64-linux-musl; the only coupling to glibc was three malloc-introspection calls we make (mallinfo, malloc_info, malloc_trim). - build.zig{,.zon}: pin mimalloc v2.3.2; -Duse_mimalloc compiles its single-source static.c with MI_MALLOC_OVERRIDE (aliases malloc/free to mi_*, so both c_allocator and RocksDB's C++ route through mimalloc) and MI_LIBC_MUSL on musl targets. - main.zig: re-gate malloc_trim on isGnuLibC(); use mi_collect for page return when mimalloc is linked. - broadcaster.zig: glibc-only mallinfo/malloc_info metrics compile out on non-glibc builds. - docs: correct the stale 0.15 deployment note; musl-investigation.md captures ground-truth + the Phase 3 runtime-validation plan. verified on macOS: static musl+mimalloc ELF builds (malloc aliased to mi_malloc, mi_collect present); glibc prod build unchanged; tests 95/1. NOT verified: runtime behaviour on musl (RocksDB illegal-instruction question, RSS at thread-scale) — needs a linux/musl canary. see docs/musl-investigation.md Phase 3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>