In technical and mechanical applications, a shim refers to a thin, flat, or wedge-shaped piece of material—such as metal, wood, plastic, or composite—utilized to fill small gaps or spaces between objects. Shims are primarily used to provide structural support, level uneven surfaces, adjust alignment tolerances, or tightly space components apart in machinery, carpentry, and construction projects. In computer programming, a shim also denotes a small wrapper library that transparently intercepts API calls to ensure compatibility between different software versions.