Solo – a .so loader for static Linux binaries
SoLo is a unique loader for static Linux binaries, enabling them to utilize existing GPU drivers without the need for containers, AppImages, or additional libc libraries. Developed with a source-first build system called IX, SoLo is designed to work with fully static Linux binaries, producing a single file that requires no dependencies and offers seamless integration.
One key challenge SoLo addresses is the inability of statically linked binaries to dynamically load GPU drivers, which are typically supplied as shared objects built with glibc. To overcome this, SoLo provides a custom dlfcn-style source API powered by its own ELF loader (for x86-64 and aarch64 architectures) and a glibc ABI bridge built on top of musl. The end result is a single static executable that can seamlessly utilize the graphics driver already installed on the host machine.
The repository includes a comprehensive Vulkan proof, where a fully static executable loads the host's unmodified Vulkan driver, runs a compute shader, and writes the output to a PNG file. This proof of concept demonstrates SoLo's capabilities across various GPU types, including AMD radv, radeonsi, Intel, and NVIDIA GPUs under Linux, and Apple M1 under Asahi Linux.
To ensure reliability, SoLo is rigorously tested on every commit, with the native build and test process running on Alpine/musl with GCC, Fedora with GCC, and Ubuntu with Clang. The Vulkan test installs each distribution's Lavapipe package but does not run the driver from an Arch sysroot, ensuring a real-world testing environment.
SoLo's core functionality is designed to be small and self-contained, making it easy to integrate into other static build graphs. The standalone archive is built with a single command, and the resulting libdlfcn.a is made available for inclusion in other musl-static applications. By redirecting ordinary dlopen()/dlsym() calls to SoLo, applications can seamlessly integrate the loader and its functionality.
The project also stands out for its unique feature of allowing static applications to embed the newest version of system libraries, such as libwayland, instead of being limited to the oldest available version on every supported system. This is achieved by providing a finite, testable compatibility layer that bridges the hard line between fully static and using the system GPU.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.