Sp.h is the standard library that C deserves
3 days ago
- #software libraries
- #systems programming
- #C programming
- The author has developed sp.h, a high-quality, ultra-portable standard library for C, designed as a single-header library independent of libc.
- Key principles include direct syscall programming, rejecting libc's harmful interfaces, eliminating the heap as a primitive, and abandoning null-terminated strings in favor of pointer-length strings.
- The library emphasizes readability, modifiability, and portability, being written in C99 and compatible with various compilers and platforms like Linux, Windows, macOS, and WASM.
- Non-goals include conformance to existing interfaces like libc, support for obscure architectures, and low-level performance optimizations like SIMD.
- The author argues C retains value due to its simplicity, broad compiler support, and direct ties to OS and libraries, inviting collaboration and feedback from the community.