Shim (computing)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
The TI Ducati SIP core does video acceleration and accelerated image processing. The actual IC doing the calculations is controlled by software running on two Cortex-M3 microcontrollers. The operating system (running on the host CPU) only needs a shim to interface with the subsystem.

In computer programming, a shim is a small library that transparently intercepts API calls and changes the arguments passed, handles the operation itself, or redirects the operation elsewhere.[1][2] Shims 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. Web polyfills are a related concept. Shims can also be used for running programs on different software platforms than they were developed for.

Examples[edit]

  • One example was the 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; in order 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 LUA bugs.[3]
  • Wine is a shim that allows running many Microsoft Windows applications on operating systems based on Linux, BSD, Solaris, and Mac OS X.
  • bind.so is a shim library for Linux that allows any application that does not permit to specify a specific bind address for a listening socket or for outgoing sockets to bind to a specific virtual IP address.[4]
  • Distributed Codec Engine is a shim

See also[edit]

References[edit]

External links[edit]