Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Runtime library
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Access to a program's runtime environment}} {{More citations needed|date=December 2013}} {{Program execution}} A '''runtime library''' is a [[library (computing)|library]] that provides access to the [[runtime environment]] that is available to a [[computer program]] {{endash}} tailored to the host [[computer platform|platform]]. A runtime environment implements the [[execution model]] as required for a development environment such as a particular [[programming language]].<ref name=":0" /> A runtime library may provide basic program facilities such as for [[memory management]] and [[exception handling]].<ref name="gcc-runtime">{{cite web | url = https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html | work = Internals of the GNU compilers |title=4. The GCC low-level runtime library | access-date = 2013-12-30 | publisher = GNU }}</ref> A runtime library is an artifact of the design of the [[toolchain]] used to build the program {{endash }} not inherently required by the host [[operating system]] or the [[programming language]] in which the program is written. The toolset is designed to [[Abstraction (computer science)|abstract]] aspects of the host platform {{endash}} often to simplify [[development tool|tool]] [[software development|development]]. The toolchain builds a program to depend on a runtime library and to use it while the program is running {{endash}} at program [[Run time (program lifecycle phase)|run-time]]. The runtime library may directly implement runtime behavior, but often it is a thin wrapper on top of operating system facilities. For example, some language features that can be performed only (or are more efficient or accurate) at runtime are implemented in the runtime environment and may be invoked via the runtime library API, 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 testing performed during development. As another example, a runtime library may contain code of built-in low-level operations too complicated for their [[inlining]] during compilation, such as implementations of arithmetic operations not directly supported by the targeted CPU, or various miscellaneous compiler-specific operations and directives.<ref name="gcc-runtime" /><ref>{{cite web | url = https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins | title = Other Built-in Functions Provided by GCC | work = GCC Introduction | access-date = 2013-12-30 | publisher = GNU }}</ref> The runtime library is often confused with the language [[standard library]] which implements functionality as defined by a language. A standard library could be implemented in a platform-specific way or it could leverage a runtime library to be platform independent. For example, the [[C standard library]] is relatively large while the platform-specific runtime library (commonly called <code>[[crt0]]</code>) is relatively small which eases supporting multiple platforms.<ref name=":0">{{cite web | url = http://www.embecosm.com/appnotes/ean9/html/ch05s02.html | title = The C Runtime Initialization, crt0.o | date = July 2010 | access-date = 2013-12-30 | publisher = Embecosm |work= Howto: Porting newlib |first1=Jeremy |last1=Bennett }}</ref> == Examples== * [[glibc]] * [[msvcrt]] == See also == * [[Static build]] == References == {{Reflist}} == External links == * [https://stackoverflow.com/questions/2766233/what-is-the-c-runtime-library What is the C runtime library?] ([[StackExchange]]) [[Category:Computer libraries]] [[Category:Run-time systems]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Endash
(
edit
)
Template:More citations needed
(
edit
)
Template:Program execution
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)