Compatibility layer: Difference between revisions
(17 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Interface that allows binaries for a legacy or foreign system to run on a host system}} |
{{Short description|Interface that allows binaries for a legacy or foreign system to run on a host system}} |
||
{{Excessive examples|date=June 2023}} |
|||
{{Technical|date=October 2022}} |
|||
In [[software engineering]], a '''compatibility layer''' is an interface that allows [[Binary file|binaries]] for a legacy or foreign system to run on a host system. This translates [[system call]]s for the foreign system into native system calls for the host system. With some [[library (computing)|libraries]] for the foreign system, this will often be sufficient to run foreign binaries on the host system. A hardware compatibility layer consists of tools that allow [[hardware emulation]]. |
In [[software engineering]], a '''compatibility layer''' is an interface that allows [[Binary file|binaries]] for a legacy or foreign system to run on a host system. This translates [[system call]]s for the foreign system into native system calls for the host system. With some [[library (computing)|libraries]] for the foreign system, this will often be sufficient to run foreign binaries on the host system. A hardware compatibility layer consists of tools that allow [[hardware emulation]]. |
||
Line 15: | Line 16: | ||
* [[Executor (software)|Executor]], which runs 68k-based "classic" Mac OS programs in Windows, Mac OS X and Linux. |
* [[Executor (software)|Executor]], which runs 68k-based "classic" Mac OS programs in Windows, Mac OS X and Linux. |
||
* [[Anbox]], an [[Android (operating system)|Android]] compatibility layer for [[Linux]]. |
* [[Anbox]], an [[Android (operating system)|Android]] compatibility layer for [[Linux]]. |
||
⚫ | |||
* [[Hybris (software)|Hybris]], library that translates Bionic into glibc calls. |
* [[Hybris (software)|Hybris]], library that translates Bionic into glibc calls. |
||
* [[Darling (software)|Darling]], a translation layer that attempts to run Mac OS X and Darwin binaries on Linux. |
* [[Darling (software)|Darling]], a translation layer that attempts to run Mac OS X and Darwin binaries on Linux. |
||
* [[Windows Subsystem for Linux]] v1, which runs Linux binaries on Windows via a compatibility layer which translates Linux system calls into native windows system calls. |
* [[Windows Subsystem for Linux]] v1, which runs Linux binaries on Windows via a compatibility layer which translates Linux system calls into native windows system calls. |
||
*[[Cygwin]], a [[POSIX]]-compatible environment that runs natively on Windows.<ref>{{Cite web|url=https://www.cygwin.com/|title=Cygwin|website=www.cygwin.com|access-date=2019-11-23}}</ref> |
*[[Cygwin]], a [[POSIX]]-compatible environment that runs natively on Windows.<ref>{{Cite web|url=https://www.cygwin.com/|title=Cygwin|website=www.cygwin.com|access-date=2019-11-23}}</ref> |
||
* [[2ine]], a project to run [[OS/2]] application on Linux<ref>https://www.patreon.com/posts/project-2ine-16513790</ref> |
* [[2ine]], a project to run [[OS/2]] application on Linux<ref>{{Cite web|url=https://www.patreon.com/posts/project-2ine-16513790|title=Project: 2ine | Patreon}}</ref> |
||
* [[Rosetta 2]], [[Apple Inc.|Apple]]'s translation layer bundled with macOS Big Sur to allow x86-64 exclusive applications to run on ARM hardware. |
* [[Rosetta 2]], [[Apple Inc.|Apple]]'s translation layer bundled with macOS Big Sur to allow x86-64 exclusive applications to run on ARM hardware. |
||
* ACL allows Android apps to natively execute on Tizen, webOS, or MeeGoo phones.<ref>{{Cite web | url=https://www.engadget.com/2012-05-15-tizen-os-android-apps.html | title=Tizen OS will run Android apps -- with a little help from third-party software (Video) }}</ref><ref>{{cite web | url=https://www.engadget.com/2013-04-28-openmobile-acl-for-webos-resurrected-on-kickstarter.html | title=OpenMobile ACL for webOS resurrected on Kickstarter, hopes to bring Android apps to HP Touchpad }}</ref><ref>{{cite web | url=https://www.engadget.com/2011-09-22-openmobile-demos-acl-for-meego-promises-100-compatibility-with.html | title=OpenMobile demos ACL for MeeGo, promises 100 percent compatibility with Android apps (Video) }}</ref> |
|||
* Alien Dalvik allows Android apps to run on MeeGo<ref>{{cite web | url=https://www.engadget.com/2011-02-08-myriad-alien-dalvik-runs-android-apps-on-any-phone-starting.html | title=Myriad 'Alien Dalvik' runs Android apps on any phone... Starting with MeeGo (Video) }}</ref> and Meamo.<ref>{{cite web | url=https://www.engadget.com/2011-02-18-myriad-alien-dalvik-hands-on-video.html | title=Myriad Alien Dalvik hands-on (Video) }}</ref> Alien Dalvik 2.0 was also revealed for iOS on an iPad, however unlike MeeGo and Meamo, this version ran from the cloud.<ref>{{cite web | url=https://www.youtube.com/watch?v=0_Q-pVrYjis | title=Running Android Apps on the iPad with Myriad's Alien Dalvik | website=[[YouTube]] }}</ref><ref>{{cite web | url=https://www.engadget.com/2011-10-10-hands-on-with-myriads-alien-dalvik-2-0-on-an-ipad-video.html | title=Hands-on with Myriad's Alien Dalvik 2.0 on an iPad (Video) }}</ref><ref>{{cite web | url=https://www.cnet.com/tech/services-and-software/android-apps-to-run-on-ipad-with-alien-dalvik-2-0/ | title=Android apps to run on iPad with Alien Dalvik 2.0 }}</ref> |
|||
* touchHLE is a compatibility layer (referred to as a “high-level emulator”) for Windows and macOS made by Andrea "hikari_no_yume" (Sweden) in early 2023 to run legacy 32-bit iOS software. The compatibility layer was only able to run one software, [[Super Monkey Ball]] as of version 0.1.0. As of version 0.1.2, support for the Lite version of Super Monkey Ball, as well as [[Crash Bandicoot Nitro Kart 3D]] and ''Touch & Go'' has been added.<ref>{{cite web | url=https://github.com/hikari-no-yume/touchHLE/blob/trunk/APP_SUPPORT.md | title=TouchHLE: High-level emulator for iPhone OS apps | website=[[GitHub]] }}</ref> She says that fans will have to "be patient" for anything else to emulate. It uses code translation along with CPU emulation when necessary, and specifically stated that she does not want to be compatible with 64 bit software.<ref>{{cite web | url=https://www.techspot.com/news/97504-high-level-ios-emulator-touchhle-aims-preserve-old.html | title=High-level iOS emulator touchHLE runs on Windows and Mac, aims to preserve old iOS gaming apps }}</ref> Later a pull request to add support for Android was issued, which allowed Android devices to run Super Monkey Ball for iOS.<ref>{{cite web | url=https://9to5mac.com/2023/04/24/ios-emulator-to-android/ | title=Developer ports iOS emulator to Android, but you shouldn't get excited about it | date=24 April 2023 }}</ref> |
|||
* ipasim is a compatibility layer for Windows that uses WinObjC to translate code from Objective C to native Windows code.<ref>{{cite web | url=http://hdl.handle.net/20.500.11956/108316 | hdl=20.500.11956/108316 | title=IOS emulator for Windows | date=27 June 2019 | last1=Joneš | first1=Jan }}</ref> |
|||
* aah (sic) is a program for macOS to run iOS apps on macOS 10.15 "Catalina" on x86 processors via translation of the programs via the [[Catalyst]] framework.<ref>{{cite web | url=https://github.com/zydeco/aah | title=Aah | website=[[GitHub]] }}</ref> |
|||
* brs-emu is a compatibility layer to run Roku software via BrightScript on other platforms: Web, Windows, macOS, and Linux.<ref>{{cite web | url=https://github.com/lvcabral/brs-emu | title=BRS-EMU: BrightScript Emulator | website=[[GitHub]] }}</ref> |
|||
Compatibility layer in [[Kernel (operating system)|kernel]]: |
Compatibility layer in [[Kernel (operating system)|kernel]]: |
||
Line 30: | Line 37: | ||
</ref> the same way as the native FreeBSD API layer.<ref>{{cite web|url=http://www.freebsd.org/doc/en/articles/linux-emulation/freebsd-emulation.html|title=Emulation|publisher=freebsd.org|access-date=2014-03-16}}</ref> FreeBSD also has some Unix-like system emulations, including NDIS, NetBSD, PECoff, SVR4, and different CPU versions of FreeBSD.<ref>{{cite web|url=http://www.freebsd.org/doc/en/articles/linux-emulation/inside.html|title=A look inside...|publisher=freebsd.org|access-date=2014-03-16}}</ref> |
</ref> the same way as the native FreeBSD API layer.<ref>{{cite web|url=http://www.freebsd.org/doc/en/articles/linux-emulation/freebsd-emulation.html|title=Emulation|publisher=freebsd.org|access-date=2014-03-16}}</ref> FreeBSD also has some Unix-like system emulations, including NDIS, NetBSD, PECoff, SVR4, and different CPU versions of FreeBSD.<ref>{{cite web|url=http://www.freebsd.org/doc/en/articles/linux-emulation/inside.html|title=A look inside...|publisher=freebsd.org|access-date=2014-03-16}}</ref> |
||
* [[NetBSD]] has several Unix-like system emulations.<ref>{{cite web|url=http://www.netbsd.org/docs/compat.html|title=NetBSD Binary Emulation|publisher=netbsd.org|access-date=2014-03-16}}</ref> |
* [[NetBSD]] has several Unix-like system emulations.<ref>{{cite web|url=http://www.netbsd.org/docs/compat.html|title=NetBSD Binary Emulation|publisher=netbsd.org|access-date=2014-03-16}}</ref> |
||
⚫ | |||
* [[Windows Subsystem for Linux]] provides a [[Linux]]-compatible kernel interface developed by Microsoft.<ref>{{Cite web|url=https://docs.microsoft.com/en-us/windows/wsl/compare-versions#whats-new-in-wsl-2|title = Comparing WSL 1 and WSL 2}}</ref> |
* [[Windows Subsystem for Linux]] provides a [[Linux]]-compatible kernel interface developed by Microsoft.<ref>{{Cite web|url=https://docs.microsoft.com/en-us/windows/wsl/compare-versions#whats-new-in-wsl-2|title = Comparing WSL 1 and WSL 2| date=20 March 2023 }}</ref> |
||
* [https://web.archive.org/web/20081015065906/http://chiharu.haun.org/peace/ The PEACE Project] (aka COMPAT_PECOFF) has Win32 compatible layer for NetBSD. The project is now inactive.<!-- |
* [https://web.archive.org/web/20081015065906/http://chiharu.haun.org/peace/ The PEACE Project] (aka COMPAT_PECOFF) has Win32 compatible layer for NetBSD. The project is now inactive.<!-- |
||
UnifiedKernel sets the Windows system calls into kernel. it doesn't need translate system calls. UnifiedKernel is a kernel not a layer. |
UnifiedKernel sets the Windows system calls into kernel. it doesn't need translate system calls. UnifiedKernel is a kernel not a layer. |
||
Line 41: | Line 49: | ||
A compatibility layer avoids both the complexity and the speed penalty of full hardware [[emulator|emulation]]. Some programs may even run faster than the original, ''e.g.'' some Linux applications running on FreeBSD's Linux compatibility layer may perform better than the same applications on Red Hat Linux. Benchmarks are occasionally run on Wine to compare it to Windows NT-based operating systems.<ref>[http://wiki.winehq.org/BenchMark-0.9.5 BenchMark-0.9.5] {{Webarchive|url=https://web.archive.org/web/20101209221003/http://wiki.winehq.org/BenchMark-0.9.5 |date=2010-12-09 }} - The Official Wine Wiki</ref> |
A compatibility layer avoids both the complexity and the speed penalty of full hardware [[emulator|emulation]]. Some programs may even run faster than the original, ''e.g.'' some Linux applications running on FreeBSD's Linux compatibility layer may perform better than the same applications on Red Hat Linux. Benchmarks are occasionally run on Wine to compare it to Windows NT-based operating systems.<ref>[http://wiki.winehq.org/BenchMark-0.9.5 BenchMark-0.9.5] {{Webarchive|url=https://web.archive.org/web/20101209221003/http://wiki.winehq.org/BenchMark-0.9.5 |date=2010-12-09 }} - The Official Wine Wiki</ref> |
||
Even on similar systems, the details of implementing a compatibility layer can be quite intricate and troublesome; a good example is the [[IRIX]] binary compatibility layer in the [[MIPS architecture]] version of [[NetBSD]].<ref> |
Even on similar systems, the details of implementing a compatibility layer can be quite intricate and troublesome; a good example is the [[IRIX]] binary compatibility layer in the [[MIPS architecture]] version of [[NetBSD]].<ref>{{cite web |
||
{{cite web |
|||
| url = http://www.onlamp.com/pub/a/bsd/2002/08/08/irix.html |
| url = http://www.onlamp.com/pub/a/bsd/2002/08/08/irix.html |
||
| title = IRIX Binary Compatibility, Part 1 |
| title = IRIX Binary Compatibility, Part 1 |
||
| date = August 8, 2002 |
|||
| author = Emmanuel Dreyfus |
| author = Emmanuel Dreyfus |
||
| publisher = onlamp.com |
|||
| access-date = 2014-03-16 <!--comment = detailed description of practical issues in compatibility layer implementation--> |
|||
| archive-date = 2017-10-21 |
|||
}} |
|||
| archive-url = https://web.archive.org/web/20171021211722/http://www.onlamp.com/pub/a/bsd/2002/08/08/irix.html |
|||
⚫ | |||
| url-status = dead |
|||
⚫ | |||
A compatibility layer requires the host system's [[Central processing unit|CPU]] to be (upwardly) [[Computer compatibility|compatible]] to that of the foreign system. For example, a Microsoft Windows compatibility layer is not possible on [[PowerPC]] hardware because Windows requires an [[x86]] CPU. In this case full emulation is needed. |
A compatibility layer requires the host system's [[Central processing unit|CPU]] to be (upwardly) [[Computer compatibility|compatible]] to that of the foreign system. For example, a Microsoft Windows compatibility layer is not possible on [[PowerPC]] hardware because Windows requires an [[x86]] CPU. In this case full emulation is needed. |
||
Line 69: | Line 81: | ||
==External links== |
==External links== |
||
*[http://www.microsoft.com/technet/prodtechnol/winxppro/plan/appcmpxp.mspx Windows XP Application Compatibility Technologies] (Dave Morehouse and Todd Phillips, Microsoft Corporation, 1 June 2001) |
*[http://www.microsoft.com/technet/prodtechnol/winxppro/plan/appcmpxp.mspx Windows XP Application Compatibility Technologies] (Dave Morehouse and Todd Phillips, Microsoft Corporation, 1 June 2001) |
||
{{Software engineering}} |
|||
{{DEFAULTSORT:Compatibility Layer}} |
{{DEFAULTSORT:Compatibility Layer}} |
Revision as of 16:20, 9 March 2024
![]() |
![]() | This article may be too technical for most readers to understand.(October 2022) |
In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With some libraries for the foreign system, this will often be sufficient to run foreign binaries on the host system. A hardware compatibility layer consists of tools that allow hardware emulation.
Software
Examples include:
- Wine, which runs some Microsoft Windows binaries on Unix-like systems using a program loader and the Windows API implemented in DLLs
- Windows's application compatibility layers to attempt to run poorly written applications or those written for earlier versions of the platform.[1]
- Lina, which runs some Linux binaries on Windows, Mac OS X and Unix-like systems with native look and feel.
- KernelEX, which runs some Windows 2000/XP programs on Windows 98/Me.
- Executor, which runs 68k-based "classic" Mac OS programs in Windows, Mac OS X and Linux.
- Anbox, an Android compatibility layer for Linux.
- Hybris, library that translates Bionic into glibc calls.
- Darling, a translation layer that attempts to run Mac OS X and Darwin binaries on Linux.
- Windows Subsystem for Linux v1, which runs Linux binaries on Windows via a compatibility layer which translates Linux system calls into native windows system calls.
- Cygwin, a POSIX-compatible environment that runs natively on Windows.[2]
- 2ine, a project to run OS/2 application on Linux[3]
- Rosetta 2, Apple's translation layer bundled with macOS Big Sur to allow x86-64 exclusive applications to run on ARM hardware.
- ACL allows Android apps to natively execute on Tizen, webOS, or MeeGoo phones.[4][5][6]
- Alien Dalvik allows Android apps to run on MeeGo[7] and Meamo.[8] Alien Dalvik 2.0 was also revealed for iOS on an iPad, however unlike MeeGo and Meamo, this version ran from the cloud.[9][10][11]
- touchHLE is a compatibility layer (referred to as a “high-level emulator”) for Windows and macOS made by Andrea "hikari_no_yume" (Sweden) in early 2023 to run legacy 32-bit iOS software. The compatibility layer was only able to run one software, Super Monkey Ball as of version 0.1.0. As of version 0.1.2, support for the Lite version of Super Monkey Ball, as well as Crash Bandicoot Nitro Kart 3D and Touch & Go has been added.[12] She says that fans will have to "be patient" for anything else to emulate. It uses code translation along with CPU emulation when necessary, and specifically stated that she does not want to be compatible with 64 bit software.[13] Later a pull request to add support for Android was issued, which allowed Android devices to run Super Monkey Ball for iOS.[14]
- ipasim is a compatibility layer for Windows that uses WinObjC to translate code from Objective C to native Windows code.[15]
- aah (sic) is a program for macOS to run iOS apps on macOS 10.15 "Catalina" on x86 processors via translation of the programs via the Catalyst framework.[16]
- brs-emu is a compatibility layer to run Roku software via BrightScript on other platforms: Web, Windows, macOS, and Linux.[17]
Compatibility layer in kernel:
- FreeBSD's Linux compatibility layer, which enables binaries built specifically for Linux to run on FreeBSD[18] the same way as the native FreeBSD API layer.[19] FreeBSD also has some Unix-like system emulations, including NDIS, NetBSD, PECoff, SVR4, and different CPU versions of FreeBSD.[20]
- NetBSD has several Unix-like system emulations.[21]
- Columbia Cycada, an unreleased compatibility layer which runs Apple iOS applications on Android systems
- Windows Subsystem for Linux provides a Linux-compatible kernel interface developed by Microsoft.[22]
- The PEACE Project (aka COMPAT_PECOFF) has Win32 compatible layer for NetBSD. The project is now inactive.
- On RSTS/E for the PDP-11 series of minicomputers, programs written to run on the RT-11 operating system could run (without recompiling) on RSTS through the RT-11 Run-Time System having its EMT flag set, meaning that an RT-11 EMT instruction that matches a RSTS EMT is diverted to the RT-11 Run-Time System which translates them to the equivalent RSTS EMT. Programs written to take advantage of RSTS directly (or calls to RSTS within the Run-Time system itself) signal this by having a second EMT instruction (usually EMT 255) immediately before the actual RSTS EMT code.
A compatibility layer avoids both the complexity and the speed penalty of full hardware emulation. Some programs may even run faster than the original, e.g. some Linux applications running on FreeBSD's Linux compatibility layer may perform better than the same applications on Red Hat Linux. Benchmarks are occasionally run on Wine to compare it to Windows NT-based operating systems.[23]
Even on similar systems, the details of implementing a compatibility layer can be quite intricate and troublesome; a good example is the IRIX binary compatibility layer in the MIPS architecture version of NetBSD.[24]
A compatibility layer requires the host system's CPU to be (upwardly) compatible to that of the foreign system. For example, a Microsoft Windows compatibility layer is not possible on PowerPC hardware because Windows requires an x86 CPU. In this case full emulation is needed.
Hardware
Hardware compatibility layers involve tools that allow hardware emulation. Some hardware compatibility layers involve breakout boxes because breakout boxes can provide compatibility for certain computer buses that are otherwise incompatible with the machine.
See also
- Hypervisor
- Paravirtualization
- Emulator
- Cross-platform virtualization
- Computing platform
- Shim (computing)
- Driver wrapper
- Glue code
References
- ^ Charlie Russel, Microsoft MVP for Windows Server and Tablet PC (2002-02-18). "Application Compatibility in Windows XP".
- ^ "Cygwin". www.cygwin.com. Retrieved 2019-11-23.
- ^ "Project: 2ine | Patreon".
- ^ "Tizen OS will run Android apps -- with a little help from third-party software (Video)".
- ^ "OpenMobile ACL for webOS resurrected on Kickstarter, hopes to bring Android apps to HP Touchpad".
- ^ "OpenMobile demos ACL for MeeGo, promises 100 percent compatibility with Android apps (Video)".
- ^ "Myriad 'Alien Dalvik' runs Android apps on any phone... Starting with MeeGo (Video)".
- ^ "Myriad Alien Dalvik hands-on (Video)".
- ^ "Running Android Apps on the iPad with Myriad's Alien Dalvik". YouTube.
- ^ "Hands-on with Myriad's Alien Dalvik 2.0 on an iPad (Video)".
- ^ "Android apps to run on iPad with Alien Dalvik 2.0".
- ^ "TouchHLE: High-level emulator for iPhone OS apps". GitHub.
- ^ "High-level iOS emulator touchHLE runs on Windows and Mac, aims to preserve old iOS gaming apps".
- ^ "Developer ports iOS emulator to Android, but you shouldn't get excited about it". 24 April 2023.
- ^ Joneš, Jan (27 June 2019). "IOS emulator for Windows". hdl:20.500.11956/108316.
- ^ "Aah". GitHub.
- ^ "BRS-EMU: BrightScript Emulator". GitHub.
- ^ "Linux emulation in FreeBSD".
- ^ "Emulation". freebsd.org. Retrieved 2014-03-16.
- ^ "A look inside..." freebsd.org. Retrieved 2014-03-16.
- ^ "NetBSD Binary Emulation". netbsd.org. Retrieved 2014-03-16.
- ^ "Comparing WSL 1 and WSL 2". 20 March 2023.
- ^ BenchMark-0.9.5 Archived 2010-12-09 at the Wayback Machine - The Official Wine Wiki
- ^ Emmanuel Dreyfus (August 8, 2002). "IRIX Binary Compatibility, Part 1". onlamp.com. Archived from the original on 2017-10-21. Retrieved 2014-03-16.
External links
- Windows XP Application Compatibility Technologies (Dave Morehouse and Todd Phillips, Microsoft Corporation, 1 June 2001)