sp.h is a 15,000-line, single-header C99 library designed as an alternative standard library that bypasses libc and programs directly against syscalls. Key design principles include explicit allocator-based memory management (no implicit heap), pointer+length strings instead of null-terminated strings, zero global mutable state, and explicit error handling. The library targets x86_64 and aarch64, supports Linux, Windows, macOS, and WASM, and works with multiple compilers including MSVC, MinGW, TCC, and Cosmopolitan. The author argues C remains uniquely valuable for its simplicity and direct machine code compilation, and sp.h aims to make it ergonomic without the cruft of decades-old libc conventions.

9m read timeFrom spader.zone
Post cover image
Table of contents
Table of ContentsPrinciplesNon-goalsA parting thoughtI want to work with you
288 Impressions