Comment by Wowfunhappy
3 years ago
> In case you weren't aware Wine is not an emulator, it is a compatibility layer.
Ehhh. I know it’s in the name, but I feel like the significance is debatable. It’s not a CPU emulator, true. It is emulating calls, which is emulation of a sort.
Usually when you say "emulator" people think there's an inherent performance hit because of a fetch-decode-execute interpreter loop somewhere. Reimplementations of things don't have that performance hit even though they are lumped under the same umbrella as actual interpreters and recompilers.
Related note: if WINE is an emulator why isn't Linux or GNU? They both reimplement parts of UNIX, which was even more proprietary than Windows is today.
Nowadays it's emulators all the way down.
On most of these architectures the software eventually executes as x86 machine code, and the distance between x86 machine code and the actual processes inside a modern CPU implementing the x86 code set is so vast you can call a modern CPU an "x86 emulator built in hardware."
Entirely accurate. Also makes it easier to have a firmware/microcode update that gives you a new instruction.
> If WINE is an emulator why isn't Linux or GNU?
I mean, it depends on the context. I don't think it would be wrong to say that Linux "emulates a UNIX environment" or some such, which is closer to what OP actually wrote about Wine.
You've probably used a "terminal emulator" at some point today. ;)
It does have a terminal emulator, but you can also drop to a tty.
> if WINE is an emulator why isn't Linux or GNU?
They... are? I mean for that matter Intel/AMD instruction sets are CISC emulators on top of RISC silicon.
UNIX source code, at least for the original versions, was released in 2002: https://slashdot.org/story/02/01/24/0146248/caldera-releases...
In regular joe-schmo parlance, an emulator would be something that translates a hardware machine into software that is run on a different machine. Hardware being the important word here. Performance has nothing to do with how people use the term emulator in regular parlance.
It’s a reimplementation of the APIs rather than an emulation. Same as how Linux reimplemented UNIX APIs, but it’s not a UNIX emulator.
That's still emulating the underlying API, and accepted usage of the word. Much like the FreeBSD linux emulator translates linux syscalls into FreeBSD ones.
By that logic any modern windows is an emulator of win32, since that is not a kernel API but a user space library "emulating" it.
Exactly the same way as wine. Wine does not translate the calls, it for most part actually implements the underlying logic.
Win32 is just a bunch of shared libraries: https://en.wikipedia.org/wiki/Microsoft_Windows_library_file...
2 replies →
Is any compatibility shim an emulator?
4 replies →
Saying wine is an emulator is as wrong as saying docker (on linux) is a virual machine, even though you could say it allows you to run a “virtual environment” in the same hand-wavy way you're using the word “emulating” in your sentence.
2 replies →
I think most people interpret emulation as CPU emulation, not a compatibility layer otherwise .NET core is probably just one fat emulator.
I hate to break to to those people, but that approach to emulation is only used for very old systems. Once you get into 32 bit, it’s mostly HLE.
By that definition, wouldn't the whole of POSIX simply be an "emulation layer" ;-)