180c1107b6992baeb556dc7a13ae8882e8c6d644
Establish the repository layout per Vox guidelines (layouts/C.md, building/C.md): Autotools build (GCC-only, C23), five compatibility profiles (--enable-onlyposix/--enable-muslmimic/--enable-muslext/ --enable-spoof, default vlibc), alongside/overwrite install methods, vlibc-gcc/vlibc-clang drivers, static-linking requirement (except spoof), benchmark harness, and tooling (.clang-format/.clang-tidy/ .clangd + compile_commands.json).
vlibc
A modern replacement for glibc: a performant, standard-conforming C library with modern extensions and high glibc compatibility.
vlibc is written in C (C23, with C2y/C29 opt-in), built with Autotools and a single compiler (GCC, no fallback). Full static linking is a first-class, required capability.
Capabilities
- Five compatibility profiles, from the lightest to the most compatible:
--enable-onlyposix— pure POSIX, nothing more.--enable-muslmimic— musl-like, light and musl-compatible.--enable-muslext— musl-extended.--enable-spoof— a glibc replica, for drop-in compatibility with scripts and programs that rely on long-standing glibc behavior.- (default) — vlibc: glibc-extended, without the spoofing layer, but with extended standard features and high glibc compatibility.
- Two install methods (
--with-install=):alongside(default) — install next to the system libc, under a vlibc-specific tree; the system libc is left untouched.overwrite— replace the system libc in place.
vlibc-gccandvlibc-clangcompiler drivers, so consuming projects build against vlibc with either compiler.- Full static linking is required for every profile except
spoof. - Compiler intent is declared on the public API (e.g.
__attribute__((const))) so the compiler can fold and eliminate calls, keeping statically linked binaries small.
Build
./autogen.sh # regenerate build system + configure
make # build
make debug # build with -O0 -g3 into bin/debug/
make release # build with -O3 into bin/release/
make bench # build and run benchmarks
make clean # remove build artifacts
make compile-commands # regenerate compile_commands.json (needs bear)
Common configure options:
./autogen.sh --enable-spoof # glibc replica profile
./autogen.sh --with-install=overwrite # replace system libc
./autogen.sh --with-libc=glibc # benchmark against glibc
./autogen.sh --enable-c29 # experimental C2y (C29)
User-provided CFLAGS and LDFLAGS are honored.
Layout
include/ public headers (mandatory)
src/ implementation sources
benchmarks/ benchmark harnesses (vs. glibc/musl)
docs/ behavior and glibc-difference documentation
thirdparty/ vendored third-party libraries
tools/ vlibc-gcc / vlibc-clang driver templates
bin/{release,debug}/ build outputs
Documentation
docs/overview.md— what vlibc is and how it behaves.docs/compatibility.md— the five profiles and glibc differences.docs/install.md— the two install methods.CONTRIBUTING.md— how to contribute.STYLEGUIDE.md— how code should look.
Languages
C
96.9%
Makefile
1.7%
Assembly
0.6%
M4
0.5%
Shell
0.3%