nolibc is a tweakable header-only implementation of a standard C library subset, which helps to build lean binaries without linking against the runtime.
nolibc provides necessary built-in functions, macros and type aliases to facilitate most needs a lean binary might have.
assert.h
:- overridable
assert
macro; - overridable
static_assert
macro;
- overridable
errno.h
:errno_t
type alias,- basic errno codes including
EOK
, strerror
andstrerror_s
functions;
limits.h
:CHAR_BIT
,RSIZE_MAX
for probabilistic validation ofsize_t
values;
stdalign.h
:alignof
,alignas
, etc.;
stdbool.h
:bool
type,true
andfalse
boolean values;
stddef.h
:NULL
,size_t
andrsize_t
standard types;
stdlib.h
:- overridable
abort
function, constraint_handler_t
type;
- overridable
stdnoreturn.h
:noreturn
function qualifier;
string.h
:memcpy
, andmemcpy_s
,memset
,strlen
.