Handmade Hero»Forums»Code
55 posts
Runtime library
The term (c) runtime and (c) runtime library comes up frequently in HH. But what is a runtime specifically, or what does it provide? I can't seem to find a definitive answer that assures me I understand what the c runtime library does for me. Why does Casey want to avoid depending on the c runtime as much as possible?

For example the new programming language Rust claims to have a 'minimal' runtime, what does this mean?
Mārtiņš Možeiko
2562 posts / 2 projects
Runtime library
C standard comes with set of functions any C standard compliant compiler should provide. For example here's draft of C89 standart: http://port70.net/~nsz/c/c89/c89-draft.html#4.

The library that implements these functions is called "runtime library" or simply "runtime". Additionally compiler provides a lot of internal functions in this library to implement various "advanced" features - like C++ exception support, some autovectorization functions, process startup/shutdown code and more.

Why you would want to not depend on it? There can be many reasons. Bad API. Unneeded API. Complex deployment (meaning more stuff to depend on, thus the pain of delivering that to customer). Casey has talked about these reasons multiple times on stream.