- Runtime library
In
computer programming , a runtime library is a specialprogram library used by acompiler , to implement functions built into aprogramming language , during theruntime (execution) of acomputer program . This often includes functions for input and output, memory management or mathematical functions.When the
source code of a computer program is translated into the respective target language by a compiler, it would cause an extreme enlargement of program code if each command in the program and every call to a built-in function would cause the in-place generation of the complete respective program code in the target language every time. Instead the compiler often uses compiler-specific auxiliary functions that are mostly not accessible to application programmers and which are implemented in the runtime library. Depending on the compiler manufacturer, the runtime library will sometimes also contain thestandard library of the respective compiler or be contained in it.Also some functions that can be performed only (or are more efficient or accurate) at runtime are implemented in the "runtime library", e.g. some logic errors, array bounds checking, dynamic type checking,
exception handling and possibly debugging functionality. For this reason, some programming bugs are not discovered until the program is tested in a "live" environment with real data, despite sophisticated compile-time checking and pre-release testing. In this case, the end user may encounter a runtime error message.Usually the runtime library realizes many functions by accessing the
operating system . Many programming languages have built-in functions that do not necessarily have to be realized in the compiler, but can be implemented in the "runtime library". So the border between "runtime library" and "standard library" is up to the compiler manufacturer. Therefore a runtime library is always compiler-specific and platform-specific.The concept of a "runtime library" should not be confused with an ordinary
program library like created by an application programmer or delivered by a third party or a dynamic library, meaning a program library linked at run time. For example, the programming language C requires only a very minimal runtime library, but defines a largestandard library (calledC Standard Library ) that each implementation has to deliver.
Wikimedia Foundation. 2010.