SoLo lets fully static musl binaries load the host's glibc GPU drivers
Static Linux binaries are the low-drama way to ship software—one file, no runtime dependencies—until the program needs a GPU. Vulkan and OpenGL drivers ship as host shared objects built against glibc, and a fully static musl executable can’t normally dlopen() them. SoLo removes that wall. It exposes an ordinary dlfcn-style API (dlopen/dlsym) backed by its own x86-64 and aarch64 ELF loader plus a glibc ABI bridge layered onto musl, so a single static binary can pull in the graphics driver already installed on the machine—no container, no AppImage, and no second libc running in the process.
The hard part isn’t loading the .so; it’s making foreign glibc-compiled code behave. SoLo deliberately never loads glibc: imports like malloc@GLIBC_2.2.5 are routed to ABI-correct adapters over the existing musl runtime, and any unsupported symbol fails loudly with its exact name and version rather than silently corrupting state. The bridge carries the parts that usually break—C++ exceptions unwind in both directions through a single process-wide unwinder, all four TLS models work without code patching, and it reproduces real ld.so semantics including RTLD_DEEPBIND, symbol versioning, IFUNCs, lazy PLT binding, and GNU/SysV hash lookups. A static-provider registry even lets the app satisfy a dependency such as libwayland with symbols already linked into the executable, so it can embed a newer version than any host provides.
The evidence is unusually concrete. A checked-in demo runs a compute shader through the host’s unmodified Vulkan driver and writes a PNG, tested on AMD radv/radeonsi, Intel, NVIDIA, and Apple M1 under Asahi. More telling, CI loads the shared objects of the 1,000 most-installed Debian packages—over 2,100 host libraries—through SoLo on both x86-64 and aarch64 on every commit. For anyone shipping self-contained Linux tools that still need hardware acceleration, this closes the one gap that traditionally forced static-binary purists back into containers.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.