Shim (computing)

In computer programming, a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere.[1][2] Shims can be used to support an old API in a newer environment, or a new API in an older environment. Shims can also be used for running programs on different software platforms than they were developed for.

Shims for older APIs typically come about when the behavior of an API changes, thereby causing compatibility issues for older applications which still rely on the older functionality; in such cases, the older API can still be supported by a thin compatibility layer on top of the newer code. Shims for newer APIs are defined as: "a library that brings a new API to an older environment, using only the means of that environment."[3]


  • Web polyfills implement newer web standards using older standards and JavaScript, if the newer standard is not available in a given web browser.[3]
  • Support of AppleTalk on Macintosh computers, during the brief period in which Apple Computer supported the Open Transport networking system. Thousands of Mac programs were based on the AppleTalk protocol; to support these programs, AppleTalk was re-implemented as an OpenTransport "stack", and then re-implemented as an API shim on top of this new library.
  • The Microsoft Windows Application Compatibility Toolkit (ACT) uses the term to mean backward compatible libraries. Shims simulate the behavior of older versions of Windows for legacy applications that rely on incorrect or deprecated functionality, or correct the way in which poorly written applications call unchanged APIs, for example to fix least-privileged user account (LUA) bugs.[4]
  • is a shim library for Linux that allows any application, regardless of permissions, to bind to a listening socket or specify outgoing IP address.[5]

See also


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.